diff --git a/dumux/implicit/mpnc/energy/mpncvtkwriterenergykinetic.hh b/dumux/implicit/mpnc/energy/mpncvtkwriterenergykinetic.hh index f929f5430d18086d1ac051485a52155547761809..a5f2d047760c79a512abff661065cbd49cc324b5 100644 --- a/dumux/implicit/mpnc/energy/mpncvtkwriterenergykinetic.hh +++ b/dumux/implicit/mpnc/energy/mpncvtkwriterenergykinetic.hh @@ -63,9 +63,6 @@ class MPNCVtkWriterEnergy<TypeTag, /*enableEnergy = */ true, /* numEnergyEquatio enum { numEnergyEqs = Indices::numPrimaryEnergyVars}; enum { velocityAveragingInModel = GET_PROP_VALUE(TypeTag, VelocityAveragingInModel) }; - enum { temperatureOutput = GET_PROP_VALUE(TypeTag, VtkAddTemperatures) }; - enum { enthalpyOutput = GET_PROP_VALUE(TypeTag, VtkAddEnthalpies) }; - enum { internalEnergyOutput = GET_PROP_VALUE(TypeTag, VtkAddInternalEnergies) }; enum { reynoldsOutput = GET_PROP_VALUE(TypeTag, VtkAddReynolds) }; enum { prandtlOutput = GET_PROP_VALUE(TypeTag, VtkAddPrandtl) }; enum { nusseltOutput = GET_PROP_VALUE(TypeTag, VtkAddNusselt) }; @@ -86,6 +83,9 @@ public: MPNCVtkWriterEnergy(const Problem &problem) : ParentType(problem) { + temperatureOutput_ = GET_PARAM_FROM_GROUP(TypeTag, bool, Vtk, AddTemperatures); + enthalpyOutput_ = GET_PARAM_FROM_GROUP(TypeTag, bool, Vtk, AddEnthalpies); + internalEnergyOutput_ = GET_PARAM_FROM_GROUP(TypeTag, bool, Vtk, AddInternalEnergies); } /*! @@ -189,15 +189,15 @@ public: this->commitScalarBuffer_(writer, "ans" , ans_); } - if (temperatureOutput){ + if (temperatureOutput_){ this->commitTemperaturesBuffer_(writer, "T_%s", temperature_); this->commitScalarBuffer_(writer, "TwMinusTn" , TwMinusTn_); this->commitScalarBuffer_(writer, "TnMinusTs" , TnMinusTs_); } - if (enthalpyOutput) + if (enthalpyOutput_) this->commitPhaseBuffer_(writer, "h_%s", enthalpy_); - if (internalEnergyOutput) + if (internalEnergyOutput_) this->commitPhaseBuffer_(writer, "u_%s", internalEnergy_); if (reynoldsOutput) this->commitPhaseBuffer_(writer, "reynoldsNumber_%s", reynoldsNumber_); @@ -272,6 +272,10 @@ private: ScalarVector awn_; ScalarVector aws_; ScalarVector ans_; + + bool temperatureOutput_; + bool enthalpyOutput_; + bool internalEnergyOutput_; }; /*! @@ -308,9 +312,6 @@ class MPNCVtkWriterEnergy<TypeTag, /*enableEnergy = */ true, /* numEnergyEquatio enum { numEnergyEqs = Indices::numPrimaryEnergyVars}; enum { velocityAveragingInModel = GET_PROP_VALUE(TypeTag, VelocityAveragingInModel) }; - enum { temperatureOutput = GET_PROP_VALUE(TypeTag, VtkAddTemperatures) }; - enum { enthalpyOutput = GET_PROP_VALUE(TypeTag, VtkAddEnthalpies) }; - enum { internalEnergyOutput = GET_PROP_VALUE(TypeTag, VtkAddInternalEnergies) }; enum { reynoldsOutput = GET_PROP_VALUE(TypeTag, VtkAddReynolds) }; enum { prandtlOutput = GET_PROP_VALUE(TypeTag, VtkAddPrandtl) }; enum { nusseltOutput = GET_PROP_VALUE(TypeTag, VtkAddNusselt) }; @@ -331,6 +332,9 @@ public: MPNCVtkWriterEnergy(const Problem &problem) : ParentType(problem) { + temperatureOutput_ = GET_PARAM_FROM_GROUP(TypeTag, bool, Vtk, AddTemperatures); + enthalpyOutput_ = GET_PARAM_FROM_GROUP(TypeTag, bool, Vtk, AddEnthalpies); + internalEnergyOutput_ = GET_PARAM_FROM_GROUP(TypeTag, bool, Vtk, AddInternalEnergies); } /*! @@ -416,7 +420,7 @@ public: void commitBuffers(MultiWriter & writer) { - if (temperatureOutput){ + if (temperatureOutput_){ this->commitTemperaturesBuffer_(writer, "T_%s", temperature_); } @@ -424,9 +428,9 @@ public: this->commitScalarBuffer_(writer, "qsf", qsf_); - if (enthalpyOutput) + if (enthalpyOutput_) this->commitPhaseBuffer_(writer, "h_%s", enthalpy_); - if (internalEnergyOutput) + if (internalEnergyOutput_) this->commitPhaseBuffer_(writer, "u_%s", internalEnergy_); if (reynoldsOutput) this->commitPhaseBuffer_(writer, "reynoldsNumber_%s", reynoldsNumber_); @@ -511,6 +515,10 @@ private: ScalarVector qBoil_ ; ScalarVector qsf_ ; PhaseDimWorldField velocity_; + + bool temperatureOutput_; + bool enthalpyOutput_; + bool internalEnergyOutput_; }; diff --git a/dumux/implicit/mpnc/mpncmodel.hh b/dumux/implicit/mpnc/mpncmodel.hh index 244a8bb693260ed8a80776cacfb54652b854924a..cd2956f0b5d5f4fa3d9a5430fc2fdc2722d32359 100644 --- a/dumux/implicit/mpnc/mpncmodel.hh +++ b/dumux/implicit/mpnc/mpncmodel.hh @@ -129,10 +129,6 @@ class MPNCModel : public GET_PROP_TYPE(TypeTag, BaseModel) enum {enableDiffusion = GET_PROP_VALUE(TypeTag, EnableDiffusion)}; enum {enableKinetic = GET_PROP_VALUE(TypeTag, EnableKinetic)}; enum {numEnergyEquations = GET_PROP_VALUE(TypeTag, NumEnergyEquations)}; - enum {enableSmoothUpwinding = GET_PROP_VALUE(TypeTag, ImplicitEnableSmoothUpwinding)}; - enum {enablePartialReassemble = GET_PROP_VALUE(TypeTag, ImplicitEnablePartialReassemble)}; - enum {enableJacobianRecycling = GET_PROP_VALUE(TypeTag, ImplicitEnableJacobianRecycling)}; - enum {numDiffMethod = GET_PROP_VALUE(TypeTag, ImplicitNumericDifferenceMethod)}; enum {numPhases = GET_PROP_VALUE(TypeTag, NumPhases)}; enum {numComponents = GET_PROP_VALUE(TypeTag, NumComponents)}; enum {numEq = GET_PROP_VALUE(TypeTag, NumEq)}; @@ -144,6 +140,14 @@ class MPNCModel : public GET_PROP_TYPE(TypeTag, BaseModel) public: + MPNCModel() + { + enableSmoothUpwinding_ = GET_PARAM_FROM_GROUP(TypeTag, bool, Implicit, EnableSmoothUpwinding); + enablePartialReassemble_ = GET_PARAM_FROM_GROUP(TypeTag, bool, Implicit, EnablePartialReassemble); + enableJacobianRecycling_ = GET_PARAM_FROM_GROUP(TypeTag, bool, Implicit, EnableJacobianRecycling); + numDiffMethod_ = GET_PARAM_FROM_GROUP(TypeTag, int, Implicit, NumericDifferenceMethod); + } + void init(Problem &problem) { ParentType::init(problem); @@ -159,10 +163,10 @@ public: << " number of energy equations: " << numEnergyEquations<< "\n" << " diffusion: " << enableDiffusion << "\n" << " energy equation: " << enableEnergy << "\n" - << " smooth upwinding: " << enableSmoothUpwinding << "\n" - << " partial jacobian reassembly: " << enablePartialReassemble << "\n" - << " numeric differentiation method: " << numDiffMethod << " (-1: backward, 0: central, +1 forward)\n" - << " jacobian recycling: " << enableJacobianRecycling << "\n"; + << " smooth upwinding: " << enableSmoothUpwinding_ << "\n" + << " partial jacobian reassembly: " << enablePartialReassemble_ << "\n" + << " numeric differentiation method: " << numDiffMethod_ << " (-1: backward, 0: central, +1 forward)\n" + << " jacobian recycling: " << enableJacobianRecycling_ << "\n"; } /*! @@ -197,6 +201,12 @@ public: } Dune::shared_ptr<MPNCVtkWriter> vtkWriter_; + +private: + bool enableSmoothUpwinding_; + bool enablePartialReassemble_; + bool enableJacobianRecycling_; + int numDiffMethod_; }; } diff --git a/dumux/implicit/mpnc/mpncmodelkinetic.hh b/dumux/implicit/mpnc/mpncmodelkinetic.hh index 46eda87f36ee85f46fc2840a032650dd58f16618..c012877b9c308d7daff64e17ba2fefdd7f8f1362 100644 --- a/dumux/implicit/mpnc/mpncmodelkinetic.hh +++ b/dumux/implicit/mpnc/mpncmodelkinetic.hh @@ -65,10 +65,6 @@ class MPNCModelKinetic : public MPNCModel<TypeTag> enum { enableDiffusion = GET_PROP_VALUE(TypeTag, EnableDiffusion)}; enum { enableKinetic = GET_PROP_VALUE(TypeTag, EnableKinetic)}; enum { numEnergyEquations = GET_PROP_VALUE(TypeTag, NumEnergyEquations)}; - enum { enableSmoothUpwinding = GET_PROP_VALUE(TypeTag, ImplicitEnableSmoothUpwinding)}; - enum { enablePartialReassemble = GET_PROP_VALUE(TypeTag, ImplicitEnablePartialReassemble)}; - enum { enableJacobianRecycling = GET_PROP_VALUE(TypeTag, ImplicitEnableJacobianRecycling)}; - enum { numDiffMethod = GET_PROP_VALUE(TypeTag, ImplicitNumericDifferenceMethod)}; enum { numPhases = GET_PROP_VALUE(TypeTag, NumPhases)}; enum { numComponents = GET_PROP_VALUE(TypeTag, NumComponents)}; enum { numEq = GET_PROP_VALUE(TypeTag, NumEq)};