precice / calculix-adapter

preCICE-adapter for the CSM code CalculiX
GNU General Public License v3.0
52 stars 20 forks source link

Redesigning of CalculiX adapter which allows ''STATIC" step for FSI simulation #63

Closed rahuldevmeher closed 2 years ago

rahuldevmeher commented 3 years ago

Hello,

I want to do a steady-state FSI simulation using CalculiX as solid solver. Currently the CalculiX adapter only allows a “DYNAMIC” step for FSI. Whereas for doing a steady-state FSI, I need to use a “STATIC” step in CalculiX. If I use the keyword “STATIC” in CalculiX input file, the following error is shown in Solid.log - **ERROR: Only thermal coupling or FSI is available with preCICE**

So, what changes need to be made in the adapter to implement this new feature where the adapter allows a “STATIC” step as well ? Suggestions are requested to implement this feature.

precice-bot commented 3 years ago

This issue has been mentioned on preCICE Forum on Discourse. There might be relevant details there:

https://precice.discourse.group/t/fsi-with-calculix-using-a-static-step/596/4

precice-bot commented 3 years ago

This issue has been mentioned on preCICE Forum on Discourse. There might be relevant details there:

https://precice.discourse.group/t/steady-state-fsi-using-openfoam-and-calculix/571/10

MatthiasFreimuth commented 3 years ago

Hello, I think the main changes would be:

  1. Adapt the ccx_2.16.c file to enable further cases, where preCICE can be used here: https://github.com/precice/calculix-adapter/blob/9fefcef8ade330280cb300c25c78df6827b44684/ccx_2.16.c#L1109
  2. Adapt the linstatic.c routine to be able to interact with preCICE (include the preCICE-API in the main iteration/increment loop of the routine) Similar to a nonlingeo_precice.c there should then be a linstatic_precice.c
  3. Include those changed files in the Makefiles accordingly

For my best knowledge that would be the general procedure to enable other simulation types of CalculiX for a preCICE simulation as well.

IshaanDesai commented 3 years ago

@MatthiasFreimuth thanks for your input! @rahuldevmeher if you want, you can start modifying the adapter and also simultaneously open a draft pull request so that I can also see the changes and help with testing. You can then also assign yourself to this issue which would indicate to other users and developers that you are developing this feature.

MatthiasFreimuth commented 2 years ago

I just figured out there is a simpler way to enable Static steps for FSI simulations in the adapter. If one specifies the following in the CalculiX input file:

STEP, NLGEOM STATIC 1,1 *END STEP

(so basically a STATIC step with the NLGEOM option, so that it is solved by the nonlingeo routine) one does not need to adapt the linstatic.c routine and a small adaption of the ccx_2.16.c(or higher) file is enough.

boris-martin commented 2 years ago

So if I understand correctly (using adapter version from your PR):

Am I right ?

MatthiasFreimuth commented 2 years ago

You're right. The NLGEOM option shouldn't change anything in the solution compared to the linear static case if there is physically no nonlinear behaviour.