diff --git a/exercises/exercise-basic/injection2p2cproblem.hh b/exercises/exercise-basic/injection2p2cproblem.hh index 95ea53d1f72e003c651f28dc59078f21ad41235a..39b0ab57b0389f731defb65b161dbef572692a73 100644 --- a/exercises/exercise-basic/injection2p2cproblem.hh +++ b/exercises/exercise-basic/injection2p2cproblem.hh @@ -152,7 +152,6 @@ public: * \brief Specifies which kind of boundary condition should be * used for which equation on a given boundary segment. * - * \param bcTypes The boundary types for the conservation equations * \param globalPos The position for which the bc type should be evaluated */ BoundaryTypes boundaryTypesAtPos(const GlobalPosition &globalPos) const @@ -181,12 +180,7 @@ public: * \brief Evaluate the boundary conditions for a neumann * boundary segment. * - * \param values Stores the Neumann values for the conservation equations in - * \f$ [ \textnormal{unit of conserved quantity} / (m^(dim-1) \cdot s )] \f$ * \param globalPos The position of the integration point of the boundary segment. - * - * For this method, the \a values parameter stores the mass flux - * in normal direction of each phase. Negative values mean influx. */ PrimaryVariables neumannAtPos(const GlobalPosition &globalPos) const { @@ -221,12 +215,7 @@ public: * \brief Evaluate the source term for all phases within a given * sub-control-volume. * - * For this method, the \a priVars parameter stores the rate mass - * of a component is generated or annihilate per volume - * unit. Positive values mean that mass is created, negative ones - * mean that it vanishes. - * - * The units must be according to either using mole or mass fractions. (mole/(m^3*s) or kg/(m^3*s)) + * \param globalPos The position for which the source term should be evaluated */ NumEqVector sourceAtPos(const GlobalPosition &globalPos) const { @@ -237,9 +226,6 @@ public: * \brief Evaluate the initial value for a control volume. * * \param globalPos The position for which the initial condition should be evaluated - * - * For this method, the \a values parameter stores primary - * variables. */ PrimaryVariables initialAtPos(const GlobalPosition &globalPos) const { diff --git a/exercises/exercise-basic/injection2pniproblem.hh b/exercises/exercise-basic/injection2pniproblem.hh index fb2bbe002a10e5f9ab59059c28f47f577dd8b6ae..77e417628476b40431045e06cb8507a4fb4e8c4d 100644 --- a/exercises/exercise-basic/injection2pniproblem.hh +++ b/exercises/exercise-basic/injection2pniproblem.hh @@ -147,7 +147,6 @@ public: * \brief Specifies which kind of boundary condition should be * used for which equation on a given boundary segment. * - * \param bcTypes The boundary types for the conservation equations * \param globalPos The position for which the bc type should be evaluated */ BoundaryTypes boundaryTypesAtPos(const GlobalPosition &globalPos) const @@ -176,12 +175,7 @@ public: * \brief Evaluate the boundary conditions for a neumann * boundary segment. * - * \param values Stores the Neumann values for the conservation equations in - * \f$ [ \textnormal{unit of conserved quantity} / (m^(dim-1) \cdot s )] \f$ * \param globalPos The position of the integration point of the boundary segment. - * - * For this method, the \a values parameter stores the mass flux - * in normal direction of each phase. Negative values mean influx. */ PrimaryVariables neumannAtPos(const GlobalPosition &globalPos) const { @@ -220,12 +214,7 @@ public: * \brief Evaluate the source term for all phases within a given * sub-control-volume. * - * For this method, the \a priVars parameter stores the rate mass - * of a component is generated or annihilate per volume - * unit. Positive values mean that mass is created, negative ones - * mean that it vanishes. - * - * The units must be according to either using mole or mass fractions. (mole/(m^3*s) or kg/(m^3*s)) + * \param globalPos The position for which the source term should be evaluated */ NumEqVector sourceAtPos(const GlobalPosition &globalPos) const { @@ -236,9 +225,6 @@ public: * \brief Evaluate the initial value for a control volume. * * \param globalPos The position for which the initial condition should be evaluated - * - * For this method, the \a values parameter stores primary - * variables. */ PrimaryVariables initialAtPos(const GlobalPosition &globalPos) const { diff --git a/exercises/exercise-basic/injection2pproblem.hh b/exercises/exercise-basic/injection2pproblem.hh index 30099c50b28349ef109ebb5175b7774ba1bd323c..aae875173477bd98d8ac046ab2c7ba976132b5ed 100644 --- a/exercises/exercise-basic/injection2pproblem.hh +++ b/exercises/exercise-basic/injection2pproblem.hh @@ -151,7 +151,6 @@ public: * \brief Specifies which kind of boundary condition should be * used for which equation on a given boundary segment. * - * \param bcTypes The boundary types for the conservation equations * \param globalPos The position for which the bc type should be evaluated */ BoundaryTypes boundaryTypesAtPos(const GlobalPosition &globalPos) const @@ -182,12 +181,7 @@ public: * \brief Evaluate the boundary conditions for a neumann * boundary segment. * - * \param values Stores the Neumann values for the conservation equations in - * \f$ [ \textnormal{unit of conserved quantity} / (m^(dim-1) \cdot s )] \f$ * \param globalPos The position of the integration point of the boundary segment. - * - * For this method, the \a values parameter stores the mass flux - * in normal direction of each phase. Negative values mean influx. */ PrimaryVariables neumannAtPos(const GlobalPosition &globalPos) const { @@ -221,12 +215,7 @@ public: * \brief Evaluate the source term for all phases within a given * sub-control-volume. * - * For this method, the \a priVars parameter stores the rate mass - * of a component is generated or annihilate per volume - * unit. Positive values mean that mass is created, negative ones - * mean that it vanishes. - * - * The units must be according to either using mole or mass fractions. (mole/(m^3*s) or kg/(m^3*s)) + * \param globalPos The position for which the source term should be evaluated */ NumEqVector sourceAtPos(const GlobalPosition &globalPos) const { @@ -237,9 +226,6 @@ public: * \brief Evaluate the initial value for a control volume. * * \param globalPos The position for which the initial condition should be evaluated - * - * For this method, the \a values parameter stores primary - * variables. */ PrimaryVariables initialAtPos(const GlobalPosition &globalPos) const { diff --git a/exercises/exercise-grids/injection2pproblem.hh b/exercises/exercise-grids/injection2pproblem.hh index f1dd004c68bc75420de8cc3d7674a113f032b707..ab11ae93baaac7983b912affa002bf66f8d21992 100644 --- a/exercises/exercise-grids/injection2pproblem.hh +++ b/exercises/exercise-grids/injection2pproblem.hh @@ -153,7 +153,6 @@ public: * \brief Specifies which kind of boundary condition should be * used for which equation on a given boundary segment. * - * \param bcTypes The boundary types for the conservation equations * \param globalPos The position for which the bc type should be evaluated */ BoundaryTypes boundaryTypesAtPos(const GlobalPosition &globalPos) const @@ -184,12 +183,7 @@ public: * \brief Evaluate the boundary conditions for a neumann * boundary segment. * - * \param values Stores the Neumann values for the conservation equations in - * \f$ [ \textnormal{unit of conserved quantity} / (m^(dim-1) \cdot s )] \f$ * \param globalPos The position of the integration point of the boundary segment. - * - * For this method, the \a values parameter stores the mass flux - * in normal direction of each phase. Negative values mean influx. */ PrimaryVariables neumannAtPos(const GlobalPosition &globalPos) const { @@ -223,9 +217,6 @@ public: * \brief Evaluate the initial value for a control volume. * * \param globalPos The position for which the initial condition should be evaluated - * - * For this method, the \a values parameter stores primary - * variables. */ PrimaryVariables initialAtPos(const GlobalPosition &globalPos) const { diff --git a/exercises/exercise-mainfile/1pproblem.hh b/exercises/exercise-mainfile/1pproblem.hh index 32d4d5b8edd3f812eb2b65008cfe76c6fbeb3817..3a8f3ae0b31ee2c400247271da08b35a35090f40 100644 --- a/exercises/exercise-mainfile/1pproblem.hh +++ b/exercises/exercise-mainfile/1pproblem.hh @@ -132,7 +132,6 @@ public: * \brief Specifies which kind of boundary condition should be * used for which equation on a given boundary control volume. * - * \param values The boundary types for the conservation equations * \param globalPos The position of the center of the finite volume */ BoundaryTypes boundaryTypesAtPos(const GlobalPosition &globalPos) const @@ -152,10 +151,7 @@ public: * \brief Evaluate the boundary conditions for a dirichlet * control volume. * - * \param values The dirichlet values for the primary variables * \param globalPos The center of the finite volume which ought to be set. - * - * For this method, the \a values parameter stores primary variables. */ PrimaryVariables dirichletAtPos(const GlobalPosition &globalPos) const { diff --git a/exercises/exercise-runtimeparams/injection2pproblem.hh b/exercises/exercise-runtimeparams/injection2pproblem.hh index d06d88886081faeffb2813a366ee6d87c8c232ad..cdc33ece0f628574cedb16009f2b98fb6066a002 100644 --- a/exercises/exercise-runtimeparams/injection2pproblem.hh +++ b/exercises/exercise-runtimeparams/injection2pproblem.hh @@ -153,7 +153,6 @@ public: * \brief Specifies which kind of boundary condition should be * used for which equation on a given boundary segment. * - * \param bcTypes The boundary types for the conservation equations * \param globalPos The position for which the bc type should be evaluated */ BoundaryTypes boundaryTypesAtPos(const GlobalPosition &globalPos) const @@ -184,12 +183,7 @@ public: * \brief Evaluate the boundary conditions for a neumann * boundary segment. * - * \param values Stores the Neumann values for the conservation equations in - * \f$ [ \textnormal{unit of conserved quantity} / (m^(dim-1) \cdot s )] \f$ * \param globalPos The position of the integration point of the boundary segment. - * - * For this method, the \a values parameter stores the mass flux - * in normal direction of each phase. Negative values mean influx. */ PrimaryVariables neumannAtPos(const GlobalPosition &globalPos) const { @@ -224,9 +218,6 @@ public: * \brief Evaluate the initial value for a control volume. * * \param globalPos The position for which the initial condition should be evaluated - * - * For this method, the \a values parameter stores primary - * variables. */ PrimaryVariables initialAtPos(const GlobalPosition &globalPos) const { diff --git a/exercises/solution/exercise-basic/injection2pniproblem.hh b/exercises/solution/exercise-basic/injection2pniproblem.hh index 95c63a16afb166b2ff06055cd52840589695b3a8..c8b82255e2f4bab4a1d99f2fb66de42d09baa68a 100644 --- a/exercises/solution/exercise-basic/injection2pniproblem.hh +++ b/exercises/solution/exercise-basic/injection2pniproblem.hh @@ -142,7 +142,6 @@ public: * \brief Specifies which kind of boundary condition should be * used for which equation on a given boundary segment. * - * \param bcTypes The boundary types for the conservation equations * \param globalPos The position for which the bc type should be evaluated */ BoundaryTypes boundaryTypesAtPos(const GlobalPosition &globalPos) const @@ -171,12 +170,7 @@ public: * \brief Evaluate the boundary conditions for a neumann * boundary segment. * - * \param values Stores the Neumann values for the conservation equations in - * \f$ [ \textnormal{unit of conserved quantity} / (m^(dim-1) \cdot s )] \f$ * \param globalPos The position of the integration point of the boundary segment. - * - * For this method, the \a values parameter stores the mass flux - * in normal direction of each phase. Negative values mean influx. */ PrimaryVariables neumannAtPos(const GlobalPosition &globalPos) const { @@ -209,12 +203,7 @@ public: * \brief Evaluate the source term for all phases within a given * sub-control-volume. * - * For this method, the \a priVars parameter stores the rate mass - * of a component is generated or annihilate per volume - * unit. Positive values mean that mass is created, negative ones - * mean that it vanishes. - * - * The units must be according to either using mole or mass fractions. (mole/(m^3*s) or kg/(m^3*s)) + * \param globalPos The position for which the source term should be evaluated */ NumEqVector sourceAtPos(const GlobalPosition &globalPos) const { @@ -225,9 +214,6 @@ public: * \brief Evaluate the initial value for a control volume. * * \param globalPos The position for which the initial condition should be evaluated - * - * For this method, the \a values parameter stores primary - * variables. */ PrimaryVariables initialAtPos(const GlobalPosition &globalPos) const { diff --git a/exercises/solution/exercise-grids/injection2pproblem.hh b/exercises/solution/exercise-grids/injection2pproblem.hh index 91a384d58b99c7256d1132515759e23a4dacf5bd..0ac137c4e699e0faa4d5b268fa5b8b1d7b23dbbf 100644 --- a/exercises/solution/exercise-grids/injection2pproblem.hh +++ b/exercises/solution/exercise-grids/injection2pproblem.hh @@ -158,7 +158,6 @@ public: * \brief Specifies which kind of boundary condition should be * used for which equation on a given boundary segment. * - * \param bcTypes The boundary types for the conservation equations * \param globalPos The position for which the bc type should be evaluated */ BoundaryTypes boundaryTypesAtPos(const GlobalPosition &globalPos) const @@ -189,12 +188,7 @@ public: * \brief Evaluate the boundary conditions for a neumann * boundary segment. * - * \param values Stores the Neumann values for the conservation equations in - * \f$ [ \textnormal{unit of conserved quantity} / (m^(dim-1) \cdot s )] \f$ * \param globalPos The position of the integration point of the boundary segment. - * - * For this method, the \a values parameter stores the mass flux - * in normal direction of each phase. Negative values mean influx. */ PrimaryVariables neumannAtPos(const GlobalPosition &globalPos) const { @@ -228,9 +222,6 @@ public: * \brief Evaluate the initial value for a control volume. * * \param globalPos The position for which the initial condition should be evaluated - * - * For this method, the \a values parameter stores primary - * variables. */ PrimaryVariables initialAtPos(const GlobalPosition &globalPos) const { diff --git a/exercises/solution/exercise-mainfile/1pproblem.hh b/exercises/solution/exercise-mainfile/1pproblem.hh index 063ae7c3808a6d9754e3bbdb7611f92415820b6c..b484f75ada5501eac0ecb6827ed020cb337208c5 100644 --- a/exercises/solution/exercise-mainfile/1pproblem.hh +++ b/exercises/solution/exercise-mainfile/1pproblem.hh @@ -77,7 +77,7 @@ public: // TODO: dumux-course-task // set the OneP Incompressible local residual for the OnePIncompressible type tag. This provides an analytic jacobian to be used for the analytic solution. Change that by setting: -//SET_TYPE_PROP(OnePIncompressible, LocalResidual, OnePIncompressibleLocalResidual<TypeTag>); +SET_TYPE_PROP(OnePIncompressible, LocalResidual, OnePIncompressibleLocalResidual<TypeTag>); // the fluid system for compressible tests @@ -114,17 +114,24 @@ class OnePTestProblem : public PorousMediumFlowProblem<TypeTag> using BoundaryTypes = typename GET_PROP_TYPE(TypeTag, BoundaryTypes); static constexpr int dimWorld = GridView::dimensionworld; using GlobalPosition = typename Element::Geometry::GlobalCoordinate; + using FluidSystem = typename GET_PROP_TYPE(TypeTag, FluidSystem); public: OnePTestProblem(std::shared_ptr<const FVGridGeometry> fvGridGeometry) : ParentType(fvGridGeometry) - {} + { + FluidSystem::Component::init(/*tempMin=*/272.15, + /*tempMax=*/294.15, + /*numTemp=*/10, + /*pMin=*/1.0e4, + /*pMax=*/1.0e6, + /*numP=*/200); + } /*! * \brief Specifies which kind of boundary condition should be * used for which equation on a given boundary control volume. * - * \param values The boundary types for the conservation equations * \param globalPos The position of the center of the finite volume */ BoundaryTypes boundaryTypesAtPos(const GlobalPosition &globalPos) const @@ -144,10 +151,7 @@ public: * \brief Evaluate the boundary conditions for a dirichlet * control volume. * - * \param values The dirichlet values for the primary variables * \param globalPos The center of the finite volume which ought to be set. - * - * For this method, the \a values parameter stores primary variables. */ PrimaryVariables dirichletAtPos(const GlobalPosition &globalPos) const { diff --git a/exercises/solution/exercise-runtimeparams/injection2pproblem.hh b/exercises/solution/exercise-runtimeparams/injection2pproblem.hh index 5fb19997ec6dac55701f558bc3ada1bb716351c3..953e36e7bc5798038dd8a794d0dc4e7eaee9e283 100644 --- a/exercises/solution/exercise-runtimeparams/injection2pproblem.hh +++ b/exercises/solution/exercise-runtimeparams/injection2pproblem.hh @@ -159,7 +159,6 @@ public: * \brief Specifies which kind of boundary condition should be * used for which equation on a given boundary segment. * - * \param bcTypes The boundary types for the conservation equations * \param globalPos The position for which the bc type should be evaluated */ BoundaryTypes boundaryTypesAtPos(const GlobalPosition &globalPos) const @@ -190,12 +189,7 @@ public: * \brief Evaluate the boundary conditions for a neumann * boundary segment. * - * \param values Stores the Neumann values for the conservation equations in - * \f$ [ \textnormal{unit of conserved quantity} / (m^(dim-1) \cdot s )] \f$ * \param globalPos The position of the integration point of the boundary segment. - * - * For this method, the \a values parameter stores the mass flux - * in normal direction of each phase. Negative values mean influx. */ PrimaryVariables neumannAtPos(const GlobalPosition &globalPos) const { @@ -230,9 +224,6 @@ public: * \brief Evaluate the initial value for a control volume. * * \param globalPos The position for which the initial condition should be evaluated - * - * For this method, the \a values parameter stores primary - * variables. */ PrimaryVariables initialAtPos(const GlobalPosition &globalPos) const {