-
-
Notifications
You must be signed in to change notification settings - Fork 105
Clarify field support for solvers in README #392
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: develop
Are you sure you want to change the base?
Changes from 5 commits
2445838
9d6584b
70ca04b
6d19c43
a0fbb27
9386747
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| - Added a table of supported fields per read/write in `README.md` [#392](https://github.com/precice/openfoam-adapter/pull/392) |
| Original file line number | Diff line number | Diff line change | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -12,32 +12,58 @@ This preCICE adapter is a plug-in (function object) for OpenFOAM, which can work | |||||||||
|
|
||||||||||
| ## What can it do? | ||||||||||
|
|
||||||||||
| This adapter can read/write the following fields in a surface coupling setup: | ||||||||||
|
|
||||||||||
| - Temperature (read + write) | ||||||||||
| - Temperature surface-normal gradient (read + write) | ||||||||||
| - Heat flux (read + write) | ||||||||||
| - Sink temperature (read + write) | ||||||||||
| - Heat transfer coefficient (read + write) | ||||||||||
| - Force (read + write) | ||||||||||
| - Stress (write) | ||||||||||
| - Displacement (read + write) | ||||||||||
| - Displacement delta (read) | ||||||||||
| - Pressure (read + write) | ||||||||||
| - Pressure surface-normal gradient (read + write) | ||||||||||
| - Velocity (read + write) | ||||||||||
| - Velocity surface-normal gradient (read + write) | ||||||||||
| - Phase fraction (alpha) (read + write) | ||||||||||
| - Phase fraction (alpha) gradient (read + write) | ||||||||||
| - Phase flux (phi) (read + write) | ||||||||||
|
|
||||||||||
| In addition, the adapter supports the following fields in a volume coupling setup: | ||||||||||
|
|
||||||||||
| - Temperature (write) | ||||||||||
| - Pressure (write) | ||||||||||
| - Velocity (read + write) | ||||||||||
|
|
||||||||||
| All features of preCICE are supported, including implicit coupling and nearest-projection mapping. Even though OpenFOAM is 3D, this adapter can also work in the 2D mode of preCICE, defining only one layer of interface nodes (automatically). | ||||||||||
| This adapter has been demonstrated on different use cases (conjugate heat transfer, fluid-structure interaction, fluid-fluid coupling), both in 2D (3D with one layer of cells in the z-axis) and 3D, and both for flow and solid OpenFOAM-based solvers (see [tutorials](https://precice.org/tutorials.html)). | ||||||||||
| The fields to read/write are provided by different adapter modules that one needs to [configure](https://precice.org/adapter-openfoam-config.html) and are currently the following. | ||||||||||
|
|
||||||||||
| Legend on locations to read/write: | ||||||||||
|
|
||||||||||
| - **N:** Mesh nodes (surface coupling) | ||||||||||
| - **F:** Face centers (surface coupling) | ||||||||||
| - **C:** cell centers (volume coupling) | ||||||||||
| - ***:** mesh connectivity supported (for e.g., nearest-projection mapping) | ||||||||||
|
|
||||||||||
| ### Module: Conjugate heat transfer | ||||||||||
|
|
||||||||||
| | Field | Write | Read | Config prefix | | ||||||||||
| | --- | --- | --- | --- | | ||||||||||
| | Heat flux | N*, F | N, F* | `Heat-Flux` | | ||||||||||
| | Heat transfer coefficient | N*, F | N, F* | `Heat-Transfer-Coefficient` | | ||||||||||
| | Sink temperature | N*, F | N, F* | `Sink-Temperature` | | ||||||||||
| | Temperature | N*, F, C | N, F*, C | `Temperature` | | ||||||||||
|
Comment on lines
+29
to
+32
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I know where the confusion here stems from: the connectivity element in the OpenFOAM adapter was initially added with nearest-projection mappings in mind, for the above data fields, the following holds
That said, for reading data, connectivity is not relevant, one would configure the face centers and leave the connectivity definition to the writing side. Internally, we only support reading on So correct would be See also: https://github.com/precice/tutorials/tree/develop/flow-over-heated-plate-nearest-projection
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Only saw your review now. I was also confused about mesh connectivity on In Adapter.C, line 100, we allow mesh connectivity for faceNodes only. if (interfaceConfig.meshConnectivity && (interfaceConfig.locationsType == "faceCenters" || interfaceConfig.locationsType == "volumeCenters" || interfaceConfig.locationsType == "volumeCentres"))
{
DEBUG(adapterInfo("Mesh connectivity is not supported for faceCenters or volumeCenters. \n"
"Please configure the desired interface with the locationsType faceNodes. \n"
"Have a look in the adapter documentation for detailed information.",
"error"));
return;
}Also in Interface.C we only do
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. But then |
||||||||||
|
|
||||||||||
| All fields are supported for both flow (compressible/incompressible) and basic (e.g., laplacianFoam) solvers. | ||||||||||
|
|
||||||||||
| ### Module: Fluid-structure interaction | ||||||||||
|
|
||||||||||
| | Field | Write | Read | Config prefix | | ||||||||||
| | --- | --- | --- | --- | | ||||||||||
| | Displacement: absolute | N*, F* | N*, F* | `Displacement` | | ||||||||||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
Should we link here to the issue? For |
||||||||||
| | Displacement: relative | N*, F* | N*, F* | `DisplacementDelta` | | ||||||||||
| | Force | F* (flow) | F* | `Force` | | ||||||||||
| | Stress | F* (flow) | F* | `Stress` | | ||||||||||
|
Comment on lines
+42
to
+43
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
What does flow here mean? I think reading Stress is not supported.
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. What I want to emphasize is that writing forces for an OpenFOAM structure solver (e.g., solidDisplacementFoam or solids4Foam) is not supported. |
||||||||||
|
|
||||||||||
| Displacement reading and writing is supported both for flow (compressible or incompressible) and structure solvers. | ||||||||||
| Force and stress writing in only supported for flow solvers, reading for both. | ||||||||||
|
|
||||||||||
| ### Module: Fluid-fluid coupling | ||||||||||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think all |
||||||||||
|
|
||||||||||
| | Field | Write | Read | Config prefix | | ||||||||||
| | --- | --- | --- | --- | | ||||||||||
| | Drag force | F*, C | F*, C | `DragForce` | | ||||||||||
| | Momentum: explicit | F*, C | F*, C | `ExplicitMomentum` | | ||||||||||
| | Momentum: implicit | F*, C | F*, C | `ImplicitMomentum` | | ||||||||||
| | Phase flux | F* | F* | `Phi` | | ||||||||||
| | Phase fraction | F*, C | F*, C | `Alpha` | | ||||||||||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
or is Phase clear here? |
||||||||||
| | Phase fraction gradient | F* | F* | `AlphaGradient` | | ||||||||||
| | Pressure | F*, C | F*, C | `Pressure` | | ||||||||||
| | Pressure: full gradient | F*, C* | F* | `PressureGradientFull` (TODO: read-only) | | ||||||||||
| | Pressure: surface-normal gradient | F* | F* | `PressureGradient` | | ||||||||||
| | Temperature | F* | F* | `FlowTemperature` | | ||||||||||
| | Temperature surface-normal gradient | F* | F* | `FlowTemperatureGradient` | | ||||||||||
| | Velocity | F*, C | F*, C | `Velocity` | | ||||||||||
| | Velocity surface-normal gradient | F* | F* | `VelocityGradient` | | ||||||||||
|
|
||||||||||
| All fields assume a flow solver. | ||||||||||
|
|
||||||||||
| ## Try | ||||||||||
|
|
||||||||||
|
|
@@ -70,6 +96,10 @@ The volume coupling functionality was contributed by Tina Vladimirova, in the co | |||||||||
|
|
||||||||||
| The adapter is [easily extensible](https://precice.org/adapter-openfoam-extend.html). | ||||||||||
|
|
||||||||||
| {% disclaimer %} | ||||||||||
| This offering is not approved or endorsed by OpenCFD Limited, producer and distributor of the OpenFOAM software via www.openfoam.com, and owner of the OPENFOAM® and OpenCFD® trade marks. | ||||||||||
| {% enddisclaimer %} | ||||||||||
|
|
||||||||||
| ### Related literature | ||||||||||
|
|
||||||||||
| [^1]: Chourdakis, G., Schneider, D., & Uekermann, B. (2023). OpenFOAM-preCICE: Coupling OpenFOAM with External Solvers for Multi-Physics Simulations. OpenFOAM® Journal, 3, 1–25.<br/> | ||||||||||
|
|
@@ -92,7 +122,3 @@ URL: https://mediatum.ub.tum.de/node?id=1696254&change_language=en | |||||||||
|
|
||||||||||
| [^7]: Tina Vladimirova. Design, implementation, and validation of a volume coupling extension for the OpenFOAM-preCICE adapter. IDP report, School of Computation, Information and Technology, Technical University of Munich, 2023.<br/> | ||||||||||
| URL: https://mediatum.ub.tum.de/1734883 | ||||||||||
|
|
||||||||||
| {% disclaimer %} | ||||||||||
| This offering is not approved or endorsed by OpenCFD Limited, producer and distributor of the OpenFOAM software via www.openfoam.com, and owner of the OPENFOAM® and OpenCFD® trade marks. | ||||||||||
| {% enddisclaimer %} | ||||||||||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -217,7 +217,7 @@ solver displacementLaplacian; | |
|
|
||
| #### FF | ||
|
|
||
| The fluid-fluid coupling module supports reading and writing `Pressure`, `Velocity`, `PressureGradient`, `VelocityGradient`, `FlowTemperature`, `FlowTemperatureGradient`, `Alpha`, `AlphaGradient` and the face flux `Phi`. | ||
| The fluid-fluid coupling module supports reading and writing `Pressure`, `Velocity`, `PressureGradient` (surface-normal gradient), `PressureGradientFull` (full pressure gradient), `VelocityGradient`, `FlowTemperature`, `FlowTemperatureGradient`, `Alpha`, `AlphaGradient`, `Phi` (face flux), `DragForce`, `ExplicitMomentum`, `ImplicitMomentum`. | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Maybe it would make sense to put the last three fields into the context of CFD-DEM, I am not sure how convenient such fields would be beyond that. Having them under fluid-fluid is also somewhat questionable. |
||
|
|
||
| Similarly to the CHT module, you need a `fixedValue` boundary condition of the respective primary field in order to read and apply values, and a `fixedGradient` boundary condition of the respective gradient field in order to read and apply gradients. | ||
|
|
||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.