-
Notifications
You must be signed in to change notification settings - Fork 4
Implement postprocessors for OpenFOAM-based quantities #76
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
base: main
Are you sure you want to change the base?
Implement postprocessors for OpenFOAM-based quantities #76
Conversation
13a5bf2 to
181c4d9
Compare
…oam Postprocessor
181c4d9 to
efa55c4
Compare
| } | ||
|
|
||
| void | ||
| FoamPostprocessorBase::threadJoin(const UserObject & uo) |
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.
[[maybe_unused]]
k-collie
left a comment
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.
First set of comments to keep you busy
| void | ||
| FoamPostprocessorBase::threadJoin(const UserObject & uo) | ||
| { | ||
| (void)uo; |
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.
[[maybe_unused]]
| Solver module for to test transfers between OpenFOAM and MOOSE. Based on Solid | ||
| solver |
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.
Update description
| foam_scalar = 'rho' | ||
| boundary = front | ||
| [] | ||
| [] |
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.
Since FoamSideAdvectiveFluxIntegral can take multiple boundaries maybe you should add one that does two added together?
| boundary = right | ||
| component = z | ||
| execute_on = TIMESTEP_END | ||
| [] |
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.
Same here - would be good to test one with multiple boundaries
| boundary = right | ||
| component = x | ||
| execute_on = TIMESTEP_END | ||
| [] |
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.
And here - multiple boundaries
| new Foam::functionObjects::wallShearStress("wallShearStress", _foam_mesh->time(), fo_dict)); | ||
| } | ||
|
|
||
| _function_object->execute(); |
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.
Add a comment explaining with this execute is needed.
| } | ||
|
|
||
| void | ||
| FoamSideIntegratedValue::createFunctionObject() |
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.
I wonder if it would be cleaner to move the _pp_function_objects check into this method.
|
|
||
| static MooseEnum _pp_function_objects("wallHeatFlux wallShearStress"); | ||
|
|
||
| class FoamSideIntegratedValue : public FoamSidePostprocessor |
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.
What would you think about splitting this class into FoamSideIntegratedFunctionObject and FoamSideIntegratedValue? It feels like this class is doing 2 things - maybe the common functionality could be put into a shared base class or some class you compose.
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.
I think this is a good idea
| // sum over ranks | ||
| gatherSum(volume); | ||
|
|
||
| // divide by area | ||
| _value /= volume; |
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.
I don't really like how this updates _value computed from FoamSideIntegratedValue::compute, maybe we could design this away.
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.
I was just trying to match the implementation used in MOOSE, but I agree, I will change it
| } | ||
| } | ||
| // sum over ranks | ||
| gatherSum(volume); |
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.
Let's call it area instead of volume
Summary
Implements two Postprocessors that create aggregate data directly from OpenFOAM data bypassing
UserObject'sinitialize,execute,finalizemethods but still being reported as Postprocessors. Unlike the parent issue, AFoamPostprocessorsinput syntax block has not been used.Related Issue
Resolves #75
Checklist