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

Fix pinball BCs #132

Closed
wants to merge 5 commits into from
Closed

Fix pinball BCs #132

wants to merge 5 commits into from

Conversation

jcallaham
Copy link
Collaborator

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).

@jcallaham
Copy link
Collaborator Author

@ludgerpaehler any idea why the CI test for black is failing on "/github/workspace/docs/conf.py"?

restart = None
checkpoint = "checkpoint-coarse.h5"

flow = hgym.Pinball(Re=10, h5_file=restart, mesh="coarse")
Copy link

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

Copy link
Collaborator Author

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.

@ludgerpaehler
Copy link
Collaborator

Just finishing off KoopmanRL, will begin to review later s.t. we get everything aligned

@jcallaham
Copy link
Collaborator Author

@ludgerpaehler any idea why the CI test for black is failing on "/github/workspace/docs/conf.py"?

Never mind - this got missed in my formatting calls for some reason. Should be okay now.

@jcallaham jcallaham mentioned this pull request Feb 26, 2024
@jcallaham
Copy link
Collaborator Author

Closing - code was merged in #134

@jcallaham jcallaham closed this Mar 2, 2024
@jcallaham jcallaham deleted the jc/pinball-bc-fix branch March 2, 2024 11:00
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 this pull request may close these issues.

3 participants