-
Notifications
You must be signed in to change notification settings - Fork 11
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
Fix pinball BCs #132
Fix pinball BCs #132
Conversation
@ludgerpaehler any idea why the CI test for black is failing on "/github/workspace/docs/conf.py"? |
examples/pinball/run-transient.py
Outdated
restart = None | ||
checkpoint = "checkpoint-coarse.h5" | ||
|
||
flow = hgym.Pinball(Re=10, h5_file=restart, mesh="coarse") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are we still using the hf_file
kwarg? I thought I had seen that checkpoints are loaded with the restart
keyword. https://github.com/dynamicslab/hydrogym/blob/main/hydrogym/core.py#L54
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, good catch. I copy-pasted from the demo script, which is also out of date.
Just finishing off KoopmanRL, will begin to review later s.t. we get everything aligned |
Never mind - this got missed in my formatting calls for some reason. Should be okay now. |
Closing - code was merged in #134 |
There was a bug in the derivation of boundary conditions for flows with multiple actuators. Basically the code initially set the "external" BCs to zero and then set each "control" BC individually to get velocity fields with the right values. But it didn't reset the external BCs to zero in between, so the inflow was incorrectly nonzero for the BC velocity fields. This happened to cancel out if you had exactly asymmetric actuation.
Also found an easier way of deriving those BC fields in a more natural way for Firedrake (via projection, instead of asking for the Riesz representation of an assembled weak form).