It is now possible to map from one field to another within the same patch, using the mappedValue boundary condition. The restriction is that the mapping must be from a different field, otherwise field values are being assigned to themselves, which produces an undefined result. The mappedValue boundary condition can now be used in place of the copiedFixedValue condition in the multiphaseEuler module. The copiedFixedValue condition has therefore been removed. In addition, the error messages that result from casting a patch to its mapping engine (mappedPatchBase) have been standardised, and made more specific to the situation in which the mapping is applied. It may be inappropriate, for example, to map within the same region or patch. These cases are now identified and appropriate error messages are generated. The error messages have also been made IO errors, so they now provide context with regards to the dictionary entries that they relate to.
54 lines
1.3 KiB
C++
54 lines
1.3 KiB
C++
/*--------------------------------*- C++ -*----------------------------------*\
|
|
========= |
|
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
|
\\ / O peration | Website: https://openfoam.org
|
|
\\ / A nd | Version: dev
|
|
\\/ M anipulation |
|
|
\*---------------------------------------------------------------------------*/
|
|
FoamFile
|
|
{
|
|
format ascii;
|
|
class volScalarField;
|
|
location "5";
|
|
object T.gas;
|
|
}
|
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
|
|
|
dimensions [0 0 0 1 0 0 0];
|
|
|
|
internalField uniform 341.65;
|
|
|
|
boundaryField
|
|
{
|
|
inlet
|
|
{
|
|
type fixedValue;
|
|
value $internalField;
|
|
}
|
|
outlet
|
|
{
|
|
type inletOutlet;
|
|
phi phi.gas;
|
|
inletValue $internalField;
|
|
value $internalField;
|
|
}
|
|
wall
|
|
{
|
|
type mappedValue;
|
|
neighbourPatch wall;
|
|
field T.liquid;
|
|
value $internalField;
|
|
}
|
|
front
|
|
{
|
|
type wedge;
|
|
}
|
|
back
|
|
{
|
|
type wedge;
|
|
}
|
|
}
|
|
|
|
|
|
// ************************************************************************* //
|