ENH: more consistent handling/documentation of 'value' entry (#2703)

- for boundary conditions such as uniformFixed, uniformMixed etc the
  optional 'value' entry (optional) is used for the initial values and
  restarts.  Otherwise the various Function1 or PatchFunction1 entries
  are evaluated and used determine the boundary condition values.

  In most cases this is OK, but in some case such coded or expression
  entries with references to other fields it can be problematic since
  they may reference fields (eg, phi) that have not yet been created.

  For these cases the 'value' entry will be needed: documentation
  updated accordingly.

STYLE: eliminate some unneeded/unused declaration headers
This commit is contained in:
Mark Olesen
2023-06-16 15:59:07 +02:00
parent fc86e52451
commit 97459771ad
89 changed files with 269 additions and 990 deletions

View File

@ -160,7 +160,7 @@ externalCoupledTemperatureMixedFvPatchScalarField
// or extrapolated value
if (!this->readValueEntry(dict))
{
fvPatchField<scalar>::patchInternalField(*this);
fvPatchField<scalar>::extrapolateInternal();
}
// Initialise as a fixed value
@ -254,7 +254,7 @@ void Foam::externalCoupledTemperatureMixedFvPatchScalarField::writeData
const scalarField& Twall = *this;
// Fluid temperature [K]
tmp<scalarField> tfluid;
scalarField Tfluid(size());
if (refTempType_ == refTemperatureType::USER)
{
@ -262,16 +262,14 @@ void Foam::externalCoupledTemperatureMixedFvPatchScalarField::writeData
const scalar currTref =
Tref_->value(this->db().time().timeOutputValue());
tfluid = tmp<scalarField>::New(size(), currTref);
Tfluid = currTref;
}
else
{
// Near wall cell temperature
tfluid = patchInternalField();
this->patchInternalField(Tfluid);
}
const scalarField Tfluid(tfluid);
// Heat transfer coefficient [W/m2/K]
// This htc needs to be always larger or equal to zero
//const scalarField htc(qDot/max(Twall - Tfluid, 1e-3));