Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DisplacementDeltas not implemented for explicit coupling? #8

Open
uekerman opened this issue Sep 14, 2018 · 5 comments · May be fixed by #23
Open

DisplacementDeltas not implemented for explicit coupling? #8

uekerman opened this issue Sep 14, 2018 · 5 comments · May be fixed by #23

Comments

@uekerman
Copy link
Member

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!

@nkr0
Copy link
Collaborator

nkr0 commented Jun 20, 2019

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

if( Precice_IsWriteCheckpointRequired() )

@uekerman
Copy link
Member Author

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.

@nkr0
Copy link
Collaborator

nkr0 commented Jun 21, 2019

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

coordinates[i * 3 + 0] = co[nodeIdx * 3 + 0] + v[nodeIdx * mt + 1];

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.

@uekerman
Copy link
Member Author

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

@nkr0
Copy link
Collaborator

nkr0 commented Jun 21, 2019

Right!

displacementDeltas[3 * i] = v[nodeIdx * mt + 1] - v_init[nodeIdx * mt + 1];

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants