mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
fvOptions: Reorganized and updated to simplify use in sub-models and maintenance
fvOptions are transferred to the database on construction using fv::options::New which returns a reference. The same function can be use for construction and lookup so that fvOptions are now entirely demand-driven. The abstract base-classes for fvOptions now reside in the finiteVolume library simplifying compilation and linkage. The concrete implementations of fvOptions are still in the single monolithic fvOptions library but in the future this will be separated into smaller libraries based on application area which may be linked at run-time in the same manner as functionObjects.
This commit is contained in:
@ -5,7 +5,6 @@ EXE_INC = \
|
||||
-I$(LIB_SRC)/finiteVolume/lnInclude \
|
||||
-I$(LIB_SRC)/meshTools/lnInclude \
|
||||
-I$(LIB_SRC)/sampling/lnInclude \
|
||||
-I$(LIB_SRC)/fvOptions/lnInclude \
|
||||
-I$(LIB_SRC)/transportModels \
|
||||
-I$(LIB_SRC)/transportModels/compressible/lnInclude \
|
||||
-I$(LIB_SRC)/transportModels/twoPhaseMixture/lnInclude \
|
||||
|
||||
@ -41,7 +41,7 @@ Description
|
||||
#include "turbulenceModel.H"
|
||||
#include "CompressibleTurbulenceModel.H"
|
||||
#include "pimpleControl.H"
|
||||
#include "fvIOoptionList.H"
|
||||
#include "fvOptions.H"
|
||||
#include "fixedFluxPressureFvPatchScalarField.H"
|
||||
#include "gaussLaplacianScheme.H"
|
||||
#include "uncorrectedSnGrad.H"
|
||||
|
||||
@ -7,7 +7,6 @@ EXE_INC = \
|
||||
-I$(LIB_SRC)/TurbulenceModels/incompressible/lnInclude \
|
||||
-I$(LIB_SRC)/transportModels/immiscibleIncompressibleTwoPhaseMixture/lnInclude \
|
||||
-I$(LIB_SRC)/finiteVolume/lnInclude \
|
||||
-I$(LIB_SRC)/fvOptions/lnInclude \
|
||||
-I$(LIB_SRC)/meshTools/lnInclude \
|
||||
-I$(LIB_SRC)/sampling/lnInclude
|
||||
|
||||
|
||||
@ -11,7 +11,6 @@ EXE_INC = \
|
||||
-I$(LIB_SRC)/dynamicMesh/lnInclude \
|
||||
-I$(LIB_SRC)/dynamicFvMesh/lnInclude \
|
||||
-I$(LIB_SRC)/meshTools/lnInclude \
|
||||
-I$(LIB_SRC)/fvOptions/lnInclude \
|
||||
-I$(LIB_SRC)/sampling/lnInclude
|
||||
|
||||
EXE_LIBS = \
|
||||
|
||||
@ -42,7 +42,7 @@ Description
|
||||
#include "immiscibleIncompressibleTwoPhaseMixture.H"
|
||||
#include "turbulentTransportModel.H"
|
||||
#include "pimpleControl.H"
|
||||
#include "fvIOoptionList.H"
|
||||
#include "fvOptions.H"
|
||||
#include "CorrectPhi.H"
|
||||
#include "fixedFluxPressureFvPatchScalarField.H"
|
||||
#include "localEulerDdtScheme.H"
|
||||
|
||||
@ -46,7 +46,7 @@ Description
|
||||
#include "immiscibleIncompressibleTwoPhaseMixture.H"
|
||||
#include "turbulentTransportModel.H"
|
||||
#include "pimpleControl.H"
|
||||
#include "fvIOoptionList.H"
|
||||
#include "fvOptions.H"
|
||||
#include "CorrectPhi.H"
|
||||
#include "fixedFluxPressureFvPatchScalarField.H"
|
||||
#include "localEulerDdtScheme.H"
|
||||
|
||||
@ -11,7 +11,6 @@ EXE_INC = \
|
||||
-I$(LIB_SRC)/finiteVolume/lnInclude \
|
||||
-I$(LIB_SRC)/transportModels \
|
||||
-I$(LIB_SRC)/meshTools/lnInclude \
|
||||
-I$(LIB_SRC)/fvOptions/lnInclude \
|
||||
-I$(LIB_SRC)/sampling/lnInclude
|
||||
|
||||
EXE_LIBS = \
|
||||
|
||||
@ -36,7 +36,7 @@ Description
|
||||
#include "immiscibleIncompressibleThreePhaseMixture.H"
|
||||
#include "turbulentTransportModel.H"
|
||||
#include "pimpleControl.H"
|
||||
#include "fvIOoptionList.H"
|
||||
#include "fvOptions.H"
|
||||
#include "CorrectPhi.H"
|
||||
#include "fixedFluxPressureFvPatchScalarField.H"
|
||||
#include "localEulerDdtScheme.H"
|
||||
|
||||
@ -8,7 +8,6 @@ EXE_INC = \
|
||||
-IphaseChangeTwoPhaseMixtures/lnInclude \
|
||||
-I$(LIB_SRC)/finiteVolume/lnInclude \
|
||||
-I$(LIB_SRC)/meshTools/lnInclude \
|
||||
-I$(LIB_SRC)/fvOptions/lnInclude\
|
||||
-I$(LIB_SRC)/sampling/lnInclude
|
||||
|
||||
EXE_LIBS = \
|
||||
|
||||
@ -11,7 +11,6 @@ EXE_INC = \
|
||||
-I$(LIB_SRC)/dynamicMesh/lnInclude \
|
||||
-I$(LIB_SRC)/dynamicFvMesh/lnInclude \
|
||||
-I$(LIB_SRC)/meshTools/lnInclude \
|
||||
-I$(LIB_SRC)/fvOptions/lnInclude\
|
||||
-I$(LIB_SRC)/sampling/lnInclude
|
||||
|
||||
EXE_LIBS = \
|
||||
|
||||
@ -49,7 +49,7 @@ Description
|
||||
#include "phaseChangeTwoPhaseMixture.H"
|
||||
#include "turbulentTransportModel.H"
|
||||
#include "pimpleControl.H"
|
||||
#include "fvIOoptionList.H"
|
||||
#include "fvOptions.H"
|
||||
#include "CorrectPhi.H"
|
||||
#include "fixedFluxPressureFvPatchScalarField.H"
|
||||
|
||||
|
||||
@ -47,7 +47,7 @@ Description
|
||||
#include "phaseChangeTwoPhaseMixture.H"
|
||||
#include "turbulentTransportModel.H"
|
||||
#include "pimpleControl.H"
|
||||
#include "fvIOoptionList.H"
|
||||
#include "fvOptions.H"
|
||||
#include "fixedFluxPressureFvPatchScalarField.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
@ -7,7 +7,6 @@ EXE_INC = \
|
||||
-I$(LIB_SRC)/TurbulenceModels/turbulenceModels/lnInclude \
|
||||
-I$(LIB_SRC)/TurbulenceModels/incompressible/lnInclude \
|
||||
-I$(LIB_SRC)/finiteVolume/lnInclude \
|
||||
-I$(LIB_SRC)/fvOptions/lnInclude \
|
||||
-I$(LIB_SRC)/meshTools/lnInclude \
|
||||
-I$(LIB_SRC)/sampling/lnInclude
|
||||
|
||||
|
||||
@ -11,7 +11,6 @@ EXE_INC = \
|
||||
-I$(LIB_SRC)/dynamicMesh/lnInclude \
|
||||
-I$(LIB_SRC)/dynamicFvMesh/lnInclude \
|
||||
-I$(LIB_SRC)/finiteVolume/lnInclude \
|
||||
-I$(LIB_SRC)/fvOptions/lnInclude \
|
||||
-I$(LIB_SRC)/meshTools/lnInclude \
|
||||
-I$(LIB_SRC)/sampling/lnInclude
|
||||
|
||||
|
||||
@ -37,7 +37,7 @@ Description
|
||||
#include "multiphaseMixture.H"
|
||||
#include "turbulentTransportModel.H"
|
||||
#include "pimpleControl.H"
|
||||
#include "fvIOoptionList.H"
|
||||
#include "fvOptions.H"
|
||||
#include "CorrectPhi.H"
|
||||
#include "fixedFluxPressureFvPatchScalarField.H"
|
||||
|
||||
|
||||
@ -36,7 +36,7 @@ Description
|
||||
#include "multiphaseMixture.H"
|
||||
#include "turbulentTransportModel.H"
|
||||
#include "pimpleControl.H"
|
||||
#include "fvIOoptionList.H"
|
||||
#include "fvOptions.H"
|
||||
#include "CorrectPhi.H"
|
||||
#include "fixedFluxPressureFvPatchScalarField.H"
|
||||
|
||||
|
||||
@ -5,7 +5,6 @@ EXE_INC = \
|
||||
-I$(LIB_SRC)/transportModels/incompressible/singlePhaseTransportModel \
|
||||
-I$(LIB_SRC)/finiteVolume/lnInclude \
|
||||
-I$(LIB_SRC)/meshTools/lnInclude \
|
||||
-I$(LIB_SRC)/fvOptions/lnInclude \
|
||||
-I$(LIB_SRC)/sampling/lnInclude
|
||||
|
||||
|
||||
|
||||
@ -9,7 +9,6 @@ EXE_INC = \
|
||||
-I$(LIB_SRC)/dynamicMesh/lnInclude \
|
||||
-I$(LIB_SRC)/dynamicFvMesh/lnInclude \
|
||||
-I$(LIB_SRC)/meshTools/lnInclude \
|
||||
-I$(LIB_SRC)/fvOptions/lnInclude \
|
||||
-I$(LIB_SRC)/sampling/lnInclude
|
||||
|
||||
|
||||
|
||||
@ -42,7 +42,7 @@ Description
|
||||
#include "singlePhaseTransportModel.H"
|
||||
#include "turbulentTransportModel.H"
|
||||
#include "pimpleControl.H"
|
||||
#include "fvIOoptionList.H"
|
||||
#include "fvOptions.H"
|
||||
#include "CorrectPhi.H"
|
||||
#include "fixedFluxPressureFvPatchScalarField.H"
|
||||
|
||||
|
||||
@ -38,7 +38,7 @@ Description
|
||||
#include "singlePhaseTransportModel.H"
|
||||
#include "turbulentTransportModel.H"
|
||||
#include "pimpleControl.H"
|
||||
#include "fvIOoptionList.H"
|
||||
#include "fvOptions.H"
|
||||
#include "fixedFluxPressureFvPatchScalarField.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
@ -10,7 +10,6 @@ EXE_INC = \
|
||||
-I$(LIB_SRC)/TurbulenceModels/phaseCompressible/lnInclude \
|
||||
-I$(LIB_SRC)/combustionModels/lnInclude \
|
||||
-I$(LIB_SRC)/finiteVolume/lnInclude \
|
||||
-I$(LIB_SRC)/fvOptions/lnInclude \
|
||||
-I$(LIB_SRC)/meshTools/lnInclude \
|
||||
-I$(LIB_SRC)/sampling/lnInclude
|
||||
|
||||
|
||||
@ -45,7 +45,7 @@ SourceFiles
|
||||
#include "PtrListDictionary.H"
|
||||
|
||||
#include "IOMRFZoneList.H"
|
||||
#include "fvIOoptionList.H"
|
||||
#include "fvOptions.H"
|
||||
|
||||
#include "volFields.H"
|
||||
#include "surfaceFields.H"
|
||||
@ -177,7 +177,7 @@ protected:
|
||||
IOMRFZoneList MRF_;
|
||||
|
||||
//- Optional FV-options
|
||||
mutable fv::IOoptionList fvOptions_;
|
||||
mutable fv::options fvOptions_;
|
||||
|
||||
//- Blending methods
|
||||
blendingMethodTable blendingMethods_;
|
||||
@ -320,7 +320,7 @@ public:
|
||||
inline const IOMRFZoneList& MRF() const;
|
||||
|
||||
//- Optional FV-options
|
||||
inline fv::IOoptionList& fvOptions() const;
|
||||
inline fv::options& fvOptions() const;
|
||||
|
||||
//- Access a sub model between a phase pair
|
||||
template <class modelType>
|
||||
|
||||
@ -82,7 +82,7 @@ inline const Foam::IOMRFZoneList& Foam::phaseSystem::MRF() const
|
||||
}
|
||||
|
||||
|
||||
inline Foam::fv::IOoptionList& Foam::phaseSystem::fvOptions() const
|
||||
inline Foam::fv::options& Foam::phaseSystem::fvOptions() const
|
||||
{
|
||||
return fvOptions_;
|
||||
}
|
||||
|
||||
@ -9,7 +9,6 @@ EXE_INC = \
|
||||
-I$(LIB_SRC)/TurbulenceModels/compressible/lnInclude \
|
||||
-I$(LIB_SRC)/TurbulenceModels/phaseCompressible/lnInclude \
|
||||
-I$(LIB_SRC)/finiteVolume/lnInclude \
|
||||
-I$(LIB_SRC)/fvOptions/lnInclude \
|
||||
-I$(LIB_SRC)/meshTools/lnInclude \
|
||||
-I$(LIB_SRC)/sampling/lnInclude
|
||||
|
||||
|
||||
@ -50,4 +50,4 @@ setRefCell
|
||||
mesh.setFluxRequired(p_rgh.name());
|
||||
|
||||
const IOMRFZoneList& MRF = fluid.MRF();
|
||||
fv::IOoptionList& fvOptions = fluid.fvOptions();
|
||||
fv::options& fvOptions = fluid.fvOptions();
|
||||
|
||||
@ -9,5 +9,4 @@ EXE_INC = \
|
||||
-I$(LIB_SRC)/TurbulenceModels/turbulenceModels/lnInclude \
|
||||
-I$(LIB_SRC)/TurbulenceModels/phaseCompressible/lnInclude \
|
||||
-I$(LIB_SRC)/finiteVolume/lnInclude \
|
||||
-I$(LIB_SRC)/fvOptions/lnInclude \
|
||||
-I$(LIB_SRC)/meshTools/lnInclude
|
||||
|
||||
@ -12,7 +12,6 @@ EXE_INC = \
|
||||
-I$(LIB_SRC)/TurbulenceModels/phaseCompressible/lnInclude \
|
||||
-I$(LIB_SRC)/combustionModels/lnInclude \
|
||||
-I$(LIB_SRC)/finiteVolume/lnInclude \
|
||||
-I$(LIB_SRC)/fvOptions/lnInclude \
|
||||
-I$(LIB_SRC)/meshTools/lnInclude \
|
||||
-I$(LIB_SRC)/sampling/lnInclude
|
||||
|
||||
|
||||
@ -10,7 +10,6 @@ EXE_INC = \
|
||||
-I$(LIB_SRC)/TurbulenceModels/compressible/lnInclude \
|
||||
-I$(LIB_SRC)/TurbulenceModels/phaseCompressible/lnInclude \
|
||||
-I$(LIB_SRC)/finiteVolume/lnInclude \
|
||||
-I$(LIB_SRC)/fvOptions/lnInclude \
|
||||
-I$(LIB_SRC)/meshTools/lnInclude \
|
||||
-I$(LIB_SRC)/sampling/lnInclude
|
||||
|
||||
|
||||
@ -74,4 +74,4 @@ setRefCell
|
||||
mesh.setFluxRequired(p_rgh.name());
|
||||
|
||||
const IOMRFZoneList& MRF = fluid.MRF();
|
||||
fv::IOoptionList& fvOptions = fluid.fvOptions();
|
||||
fv::options& fvOptions = fluid.fvOptions();
|
||||
|
||||
@ -10,5 +10,4 @@ EXE_INC = \
|
||||
-I$(LIB_SRC)/TurbulenceModels/turbulenceModels/lnInclude \
|
||||
-I$(LIB_SRC)/TurbulenceModels/phaseCompressible/lnInclude \
|
||||
-I$(LIB_SRC)/finiteVolume/lnInclude \
|
||||
-I$(LIB_SRC)/fvOptions/lnInclude \
|
||||
-I$(LIB_SRC)/meshTools/lnInclude
|
||||
|
||||
@ -11,7 +11,6 @@ EXE_INC = \
|
||||
-I$(LIB_SRC)/TurbulenceModels/phaseCompressible/lnInclude \
|
||||
-I$(LIB_SRC)/combustionModels/lnInclude \
|
||||
-I$(LIB_SRC)/finiteVolume/lnInclude \
|
||||
-I$(LIB_SRC)/fvOptions/lnInclude \
|
||||
-I$(LIB_SRC)/meshTools/lnInclude \
|
||||
-I$(LIB_SRC)/sampling/lnInclude
|
||||
|
||||
|
||||
@ -31,7 +31,7 @@ License
|
||||
#include "fvcDdt.H"
|
||||
#include "fvcDiv.H"
|
||||
#include "fvcAverage.H"
|
||||
#include "fvOptionList.H"
|
||||
#include "fvOptions.H"
|
||||
#include "mathematicalConstants.H"
|
||||
#include "fundamentalConstants.H"
|
||||
#include "addToRunTimeSelectionTable.H"
|
||||
@ -155,12 +155,7 @@ void Foam::diameterModels::IATE::correct()
|
||||
R -= sources_[j].R();
|
||||
}
|
||||
|
||||
// const_cast needed because the operators and functions of fvOptions
|
||||
// are currently non-const.
|
||||
fv::optionList& fvOptions = const_cast<fv::optionList&>
|
||||
(
|
||||
phase_.mesh().lookupObject<fv::optionList>("fvOptions")
|
||||
);
|
||||
fv::options& fvOptions(fv::options::New(phase_.mesh()));
|
||||
|
||||
// Construct the interfacial curvature equation
|
||||
fvScalarMatrix kappaiEqn
|
||||
|
||||
@ -10,7 +10,6 @@ EXE_INC = \
|
||||
-IinterfacialModels/lnInclude \
|
||||
-ItwoPhaseSystem/lnInclude \
|
||||
-I$(LIB_SRC)/finiteVolume/lnInclude \
|
||||
-I$(LIB_SRC)/fvOptions/lnInclude \
|
||||
-I$(LIB_SRC)/meshTools/lnInclude \
|
||||
-I$(LIB_SRC)/sampling/lnInclude
|
||||
|
||||
|
||||
@ -8,5 +8,4 @@ EXE_INC = \
|
||||
-I$(LIB_SRC)/TurbulenceModels/turbulenceModels/lnInclude \
|
||||
-I$(LIB_SRC)/TurbulenceModels/phaseCompressible/lnInclude \
|
||||
-I$(LIB_SRC)/finiteVolume/lnInclude \
|
||||
-I$(LIB_SRC)/fvOptions/lnInclude \
|
||||
-I$(LIB_SRC)/meshTools/lnInclude
|
||||
|
||||
@ -34,7 +34,7 @@ Description
|
||||
#include "twoPhaseSystem.H"
|
||||
#include "PhaseCompressibleTurbulenceModel.H"
|
||||
#include "pimpleControl.H"
|
||||
#include "fvIOoptionList.H"
|
||||
#include "fvOptions.H"
|
||||
#include "fixedFluxPressureFvPatchScalarField.H"
|
||||
#include "fixedValueFvsPatchFields.H"
|
||||
|
||||
|
||||
@ -8,7 +8,6 @@ EXE_INC = \
|
||||
-I$(LIB_SRC)/TurbulenceModels/compressible/lnInclude \
|
||||
-I$(LIB_SRC)/TurbulenceModels/phaseCompressible/lnInclude \
|
||||
-I$(LIB_SRC)/finiteVolume/lnInclude \
|
||||
-I$(LIB_SRC)/fvOptions/lnInclude \
|
||||
-I$(LIB_SRC)/meshTools/lnInclude \
|
||||
-I$(LIB_SRC)/sampling/lnInclude
|
||||
|
||||
|
||||
@ -32,7 +32,7 @@ License
|
||||
#include "fvcDdt.H"
|
||||
#include "fvcDiv.H"
|
||||
#include "fvcAverage.H"
|
||||
#include "fvOptionList.H"
|
||||
#include "fvOptions.H"
|
||||
#include "mathematicalConstants.H"
|
||||
#include "fundamentalConstants.H"
|
||||
#include "addToRunTimeSelectionTable.H"
|
||||
@ -156,12 +156,7 @@ void Foam::diameterModels::IATE::correct()
|
||||
R -= sources_[j].R();
|
||||
}
|
||||
|
||||
// const_cast needed because the operators and functions of fvOptions
|
||||
// are currently non-const.
|
||||
fv::optionList& fvOptions = const_cast<fv::optionList&>
|
||||
(
|
||||
phase_.U().mesh().lookupObject<fv::optionList>("fvOptions")
|
||||
);
|
||||
fv::options& fvOptions(fv::options::New(phase_.mesh()));
|
||||
|
||||
// Construct the interfacial curvature equation
|
||||
fvScalarMatrix kappaiEqn
|
||||
|
||||
Reference in New Issue
Block a user