precice / calculix-adapter

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

Extend adapter to also handle 2D interfaces #44

Closed uekerman closed 3 years ago

uekerman commented 4 years ago

Currently the adapter only works with 3D coupling interfaces, meaning ... https://github.com/precice/calculix-adapter/blob/ad446eb52b3c889f61268755db8dba75f2bf1d83/adapter/PreciceInterface.c#L379 ... is 3.

For quasi-2D cases (a 2D mesh that is only extruded by one layer in span-wise direction), it can be beneficial to make CalculiX behave as a 2D solver (from preCICE perspective): if the other solver is 2D, or for numerical reasons (https://github.com/precice/tutorials/issues/112).

In that cases, read forces need to be equally distributed to both mesh layers and displacements (to be written) need to be averaged. Span-wise coordinates should be dropped.

Furthermore, there should be an error message if preCICE is 2D, but the case isn't quasi-2D, but real 3D.

IshaanDesai commented 3 years ago

The extension of the adapter to handle 2D interfaces is being done here: https://github.com/precice/calculix-adapter/tree/handle2DInterfaces

IshaanDesai commented 3 years ago

Resolved in: ba9d3af2993a311f7cefe3914f0ceccbc71edfed

davidscn commented 3 years ago

@IshaanDesai Do you assume in the solution (#49 ) that the out-of-plane direction is the z-axis? Or is it also possible to have a quasi-2D case in the zx-layer?

IshaanDesai commented 3 years ago

In the current design it is assumed that the out-of-plane direction is the Z-axis

davidscn commented 3 years ago

I think we should either extend (depending on how it is implemented) or add an assertion. I ran into this yesterday and if you start now a 2d Calclulix case in a different plane you just get a 'core dumped' which is probably the most user unfriendly message.

IshaanDesai commented 3 years ago

For now I will add an assertion :+1: can you post the error message in an issue? I will handle it in a PR then. Extending the adapter design to handle any axis as out-of-plane would be a larger work package.

precice-bot commented 2 years ago

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

https://precice.discourse.group/t/fsi-of-a-deformable-pitching-foil-with-openfoam-and-calculix/810/15