Skip to content

Thermo-Mech Coupling and Consistent/Conservative Interpolation

Boman Romain requested to merge lacroix into master

Created by: ghost

Consistent and Conservative Interpolation

The parameter interpType allows choosing between consistent and conservative interpolation. The consistent one communicates the stress field from the fluid to the solid solver, the interpolated field is then projected and integrated by the solid solver on its own mesh. The conservative interpolation communicates nodal loads from the fluid to the solid solver by conserving the total energy of the interface, practically, it uses the transpose of the consistent solid-to-fluid interpolation matrix (the one used to communicate the interface displacement).

In this MR, only Metafor is able to receive a consistent interpolation (i.e. a vector of averaged nodal stresses). On the other hand, only PFEM3D is able to generate a vector of averaged nodal stresses. If the solid wrapper does not define its own implementation of applyNodalStress, the function returns NotImplementedError. Due to the way CUPyDO is working, getNodalStress returns zero if the latter is not implemented by the fluid solver (ideally, it should also return NotImplementedError, I will fix this in a future MR).

Thermo-Mechanical Coupling

The type of coupling is defined by mechanical = True/False and thermal = True/False. The thermal coupling has been finalized on the BGS algorithm, and the FFTB support has been extended to the IQN-ILS and the IQN-MVJ algorithms. Some PFEM3D-Metafor test cases were added to test both thermal and thermo-mechanical couplings. The adjoint thermal coupling is not done yet, mainly because PFEM3D is not an adjoint solver.

Non-Dimensional Tolerance

Historically, the norm of the displacement increment was used in the convergence criterion (this option can be recovered by setting criterion = norm), meaning that the tolerance had the dimension of a displacement. Moreover, the magnitude of the tolerance is affected by the number of nodes. This may be unpractical and an adimensional convergence criterion relative has been added. In such case, we check for epsilon < tolerance such that

\text{epsilon} = \frac{|\text{predicted quantity} - \text{reference quantity}|}{|\text{reference quantity}| + \text{tolerance}} < \text{tolerance}

Thermal and mechanical convergence criterion are set separately by thermalTol and mechanicalTol. I updated the test cases with criterion = relative. Since the new tolerance has a different meaning (and is generally more strict), I updated the reference solution such that the battery is passing again.

Other Changes

  • Some useless parameters and functions have been removed from CUPyDO.
  • The parameter computationType = adjoint/direct has been renamed computation.
  • The (old) parameter computation = steady/unsteady has been renamed regime to avoid confusion.
  • The remeshing is now managed by the fluid wrapper and merged with the update function.
  • CUPyDO raises exceptions for some unimplemented functionalities.
  • The ordering of some function parameters have been homogenized in the code.
  • The second order displacement predictor was not working and has been removed, I will fix it in a future MR.
  • All classes now take a dictionary of parameters instead of thousands of separated inputs.
  • The weakly compressible test case of PFEM3D has been disabled due to instability.

Merge request reports

Loading