calculix-adapter icon indicating copy to clipboard operation
calculix-adapter copied to clipboard

DisplacementDeltas not implemented for explicit coupling?

Open uekerman opened this issue 7 years ago • 5 comments

https://github.com/precice/calculix-adapter/blob/master/adapter/PreciceInterface.c

It seems like sim->coupling_init_v is only updated for implicit coupling (through Precice_WriteIterationCheckpoint), but never if only explicit coupling is used.

@arusch Are we overseeing something?

Thanks!

uekerman avatar Sep 14 '18 18:09 uekerman

Is there a difference in how Precice_IsWriteCheckpointRequired responds in implicit coupling and explicit coupling?

https://github.com/precice/calculix-adapter/blob/10938d846aa99e1b5a7c8a38dbf4cf5082c586aa/nonlingeo_precice.c#L1116

nkr0 avatar Jun 20 '19 11:06 nkr0

Yes, for explicit coupling, it will always return false since you don't need checkpoints. For implicit coupling it returns true in the first iteration of a timestep (that's when you need to store the checkpoint) and false afterwards.

uekerman avatar Jun 21 '19 11:06 uekerman

So, when should sim->coupling_init_v be updated in explicit coupling? Do you mean for simulation restarts?

https://github.com/precice/calculix-adapter/blob/10938d846aa99e1b5a7c8a38dbf4cf5082c586aa/adapter/CCXHelpers.c#L83

Here the previous solution is added to coordinates and the comment says it is for restarts. Although I'm not really sure how correct that is. Displacement is the solution from a loaded condition. But changing the coordinates really alters the solid. It can stay in the displaced state without any load acting on it.

Possibly there are other parts to the restart setting that I haven't seen.

nkr0 avatar Jun 21 '19 11:06 nkr0

No, this should not be related to restarts. For explicit coupling, sim->coupling_init_v needs to be updated after every timestep.

uekerman avatar Jun 21 '19 11:06 uekerman

Right!

https://github.com/precice/calculix-adapter/blob/10938d846aa99e1b5a7c8a38dbf4cf5082c586aa/adapter/CCXHelpers.c#L148

This must be why I was getting wrong velocities when computed at the fluid side from DisplacementDeltas in explicit coupling. I thought the mistake was on the fluid side and added functionality to transfer velocities.

nkr0 avatar Jun 21 '19 12:06 nkr0