Implement mixed boundary condition (Robin) in Generic module#400
Implement mixed boundary condition (Robin) in Generic module#400
Conversation
MakisH
left a comment
There was a problem hiding this comment.
Looks good overall, some minor suggestions.
From our discussion: The robin test case would also be nice to have as a tutorial, with the new schema, to use as a test case.
Reply by @vidulejs: We don't have the complete support yet, as we are missing the conductivity calculation. In this case, it happens to work because the coefficient is 1. In that sense, adding this tutorial wouldbe misleading at the moment.
| if (isA<fixedValueFvPatchScalarField>(bc)) | ||
| { | ||
| auto& boundaryPatch = refCast<fixedValueFvPatchScalarField>(bc); |
There was a problem hiding this comment.
We could add similar checks and error messages here: if not a supported operation for this BC type, throw an error.
| else if (isA<mixedFvPatchScalarField>(bc)) | ||
| { | ||
| auto& boundaryPatch = refCast<mixedFvPatchScalarField>(bc); | ||
| if (fieldConfig_.operation == "ref-value" || fieldConfig_.operation == "value") |
There was a problem hiding this comment.
Maybe add a comment for the motivation for both checks here.
There was a problem hiding this comment.
Needs a changelog entry as well.
Implemented mixed boundary condition (Robin) in Generic module. This allows to replicate, for example, CHT cases where there are
Sink-TemperatureandHeat-Transfer-Coefficientcoupling data. I've been able to validate the implementation on the tutorialheat-exchanger(pictures to follow).There are new
operationoptions available to set the mixed boundary conditions when reading data from preCICE:ref-valueref-gradientvalue-fraction,which will set the respective fields in the OpenFOAM mixed BC.
To test the implementation standalone from the CHT module, I created a new tutorial case
partitioned-heat-transfer-robinon my fork of the tutorials.Here's the example preciceDict configuration for that case:
TODO list:
docs/changelog-entries/(create directory if missing)