Performance issue: MOOSE+NEML2 computation time increases significantly with DOF compared to COMSOL #32133
Replies: 3 comments 16 replies
-
|
Thank you for the report and more so for providing all of the input! We can take an attempt at profiling this. @hugary1995 do you want to look into this or should I do the profile? |
Beta Was this translation helpful? Give feedback.
-
are the profiles from before or after the change? Is the issue with nonlinear convergence due to a problem in the Jacobian the reason for poor scaling?
Do the boundary condition depend both on this data and on the nonlinear variables? Are you interpolating a value from the CSV data using the boundary value of a variable? |
Beta Was this translation helpful? Give feedback.
-
|
What solver/preconditioner are you using in COMSOL? It appears you are using LU in MOOSE which does not scale linearly with degrees of freedom |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello developers,
I am using MOOSE + NEML2 to improve the simulation efficiency of inelastic constitutive models. However, I have observed that as the degrees of freedom (DOF) increase, the computation time in MOOSE increases much more rapidly compared to my previous experience with COMSOL.
All my MOOSE+NEML2 input files:
https://github.com/zhangjunzheng136/moose-neml2/tree/main
I believe there's something need to be done in my MOOSE+NEML2 input files, but failed. The input files gave correct result, so there's only problem of effeciency, not correctness.
It would be nice of you for reading and analysing the problem.
time (seconds)
Context and Comparison
My previous implementation in COMSOL was quite cumbersome. Therefore, I expected the NEML2 implementation (which is with many constitutive models) to be significantly more efficient. However, this performance advantage disappears when the mesh density increases.
Problem Description
Geometry: A rectangular block.
Physics: Inelastic constitutive model implemented in NEML2. Thermal expansion calculated in MOOSE.
Boundary Conditions: Uniaxial tension. Displacements on three faces are constrained to prevent rigid body motion; a displacement BC is applied to the loading face.
Mesh: Same mesh used in both MOOSE and COMSOL (both 2nd-order Lagrangian elements).
Hardware: CPU, 4 cores.
Issue with Input Data and Jacobian
I initially performed a Jacobian check and found large errors. I investigated and found this was caused by using linear interpolation on CSV data for the boundary conditions (causing non-smooth derivatives).
When I replaced the BC function with a smooth function (e.g., time$t$ ), the Jacobian check passed (no error), and the simulation results matched literature values. This confirms the physics implementation is correct.
The Dilemma: I plan to use extensive time-series data from experiments as boundary conditions, so reading from CSV files is unavoidable. I am concerned that using Spline interpolation might be inefficient or unstable for very large datasets.
MOOSE logs:
COMSOL log:
Beta Was this translation helpful? Give feedback.
All reactions