diff --git a/exercises/exercise-basic/injection2pniproblem.hh b/exercises/exercise-basic/injection2pniproblem.hh index 76e52cc1c2e0b069f60860cee76f7e4ebed86b6c..a08be51ef39587409027233569e376795fdd19c0 100644 --- a/exercises/exercise-basic/injection2pniproblem.hh +++ b/exercises/exercise-basic/injection2pniproblem.hh @@ -36,7 +36,7 @@ namespace Dumux { * \ingroup TwoPModel * \ingroup ImplicitTestProblems * \brief Gas injection problem where a gas (here nitrogen) is injected into a fully - * water saturated medium. During buoyancy driven upward migration the gas + * water saturated medium. During buoyancy-driven upward migration the gas * passes a high temperature area. * * The domain is sized 60 m times 40 m. @@ -75,7 +75,7 @@ public: Injection2PNIProblem(std::shared_ptr<const GridGeometry> gridGeometry) : ParentType(gridGeometry) { - // initialize the tables of the fluid system + // Initialize the tables of the fluid system FluidSystem::init(/*tempMin=*/273.15, /*tempMax=*/423.15, /*numTemp=*/50, @@ -87,9 +87,9 @@ public: // getParam<TYPE>("GROUPNAME.PARAMNAME") reads and sets parameter PARAMNAME // of type TYPE given in the group GROUPNAME from the input file name_ = getParam<std::string>("Problem.Name"); - // depth of the aquifer, units: m + // depth of the aquifer, unit: m aquiferDepth_ = getParam<Scalar>("Problem.AquiferDepth"); - // the duration of the injection, units: second + // the duration of the injection, unit: seconds injectionDuration_ = getParam<Scalar>("Problem.InjectionDuration"); } @@ -116,11 +116,10 @@ public: bcTypes.setAllNeumann(); /*! - * TODO:dumux-course-task: - * dumux-course-task: - * set Dirichlet conditions for the energy equation on the left boundary - * and Neumann everywhere else - * think about: is there anything necessary to do here? + * TODO:dumux-course-task 4: + * Set Dirichlet conditions for the energy equation on the left boundary + * and Neumann everywhere else. + * Think about: is there anything necessary to do here? */ return bcTypes; @@ -137,10 +136,9 @@ public: return initialAtPos(globalPos); /*! - * TODO:dumux-course-task: - * dumux-course-task: - * set Dirichlet conditions for the energy equation on the left boundary - * think about: is there anything necessary to do here? + * TODO:dumux-course-task 4: + * Set Dirichlet conditions for the energy equation on the left boundary. + * Think about: is there anything necessary to do here? */ } @@ -159,14 +157,14 @@ public: if (injectionActive() && onInjectionBoundary(globalPos)) { // inject nitrogen. negative values mean injection - // units kg/(s*m^2) + // unit: kg/(s*m^2) values[Indices::conti0EqIdx + FluidSystem::N2Idx] = -1e-4; values[Indices::conti0EqIdx + FluidSystem::H2OIdx] = 0.0; /*! - * TODO:dumux-course-task: + * TODO:dumux-course-task 4: * Set Neumann noflow conditions for the energy equation everywhere else except the left boundary. - * Additionally, consider the energy flux at the injection point which is equal to the product of the respective mass flux and the matching enthalpy. Use the function `gasEnthalpy(...)` from the N2 component to access the necessary enthalpy. + * Additionally, consider the energy flux at the injection point which is equal to the product of the respective mass flux and the matching enthalpy. Use the function `gasEnthalpy(temperature,pressure)` from the N2 component to access the necessary enthalpy. * hint: use `Indices::energyEqIdx` to access the entry belonging to the energy flux. */ } @@ -205,16 +203,16 @@ public: values[Indices::saturationIdx] = 0.0; /*! - * TODO:dumux-course-task: - * set a temperature gradient of 0.03 K per m beginning at 283 K here. - * Hint: you can use aquiferDepth_ and the globalPos similar to the pressure gradient - * use globalPos[0] and globalPos[1] to implement the high temperature lens with 380 K + * TODO:dumux-course-task 4: + * Set a temperature gradient of 0.03 K per m beginning at 283 K here. + * Hint: you can use aquiferDepth_ and the globalPos similar to the pressure gradient. + * Use globalPos[0] and globalPos[1] to implement the high temperature lens with 380 K * Hint : use Indices::temperatureIdx to address the initial values for temperature */ return values; } - //! set the time for the time dependent boundary conditions (called from main) + //! Set the time for the time dependent boundary conditions (called from main) void setTime(Scalar time) { time_ = time; } diff --git a/exercises/exercise-basic/injection2pproblem.hh b/exercises/exercise-basic/injection2pproblem.hh index 01e5d0bb419bf751d3f5229f91305e9fa9ad2787..9ef1163c7d0cf63e2070f0d17b9e048b566fe55f 100644 --- a/exercises/exercise-basic/injection2pproblem.hh +++ b/exercises/exercise-basic/injection2pproblem.hh @@ -75,7 +75,7 @@ public: Injection2PProblem(std::shared_ptr<const GridGeometry> gridGeometry) : ParentType(gridGeometry) { - // initialize the tables of the fluid system + // Initialize the tables of the fluid system FluidSystem::init(/*tempMin=*/273.15, /*tempMax=*/423.15, /*numTemp=*/50, @@ -83,13 +83,13 @@ public: /*pMax=*/30e6, /*numP=*/300); - // name of the problem and output file + // Name of the problem and output file // getParam<TYPE>("GROUPNAME.PARAMNAME") reads and sets parameter PARAMNAME // of type TYPE given in the group GROUPNAME from the input file name_ = getParam<std::string>("Problem.Name"); - // depth of the aquifer, units: m + // Depth of the aquifer, unit: m aquiferDepth_ = getParam<Scalar>("Problem.AquiferDepth"); - // the duration of the injection, units: second + // The duration of the injection, unit: seconds injectionDuration_ = getParam<Scalar>("Problem.InjectionDuration"); } @@ -149,8 +149,8 @@ public: // than using <= or >= as it is robust with regard to imprecision introduced by rounding errors. if (injectionActive() && onInjectionBoundary(globalPos)) { - // inject nitrogen. negative values mean injection - // units kg/(s*m^2) + // Inject nitrogen. Negative values mean injection + // unit: kg/(s*m^2) values[Indices::conti0EqIdx + FluidSystem::N2Idx] = -1e-4; values[Indices::conti0EqIdx + FluidSystem::H2OIdx] = 0.0; } @@ -194,7 +194,7 @@ public: // \} - //! set the time for the time dependent boundary conditions (called from main) + //! Set the time for the time dependent boundary conditions (called from main) void setTime(Scalar time) { time_ = time; } diff --git a/exercises/solution/exercise-basic/injection2pniproblem.hh b/exercises/solution/exercise-basic/injection2pniproblem.hh index 5a61045bc1e83102dcf4fd7688ebca3b9b048624..01734701cc5d745494991db93f0e5fbacf5f9553 100644 --- a/exercises/solution/exercise-basic/injection2pniproblem.hh +++ b/exercises/solution/exercise-basic/injection2pniproblem.hh @@ -35,7 +35,7 @@ namespace Dumux { * \ingroup TwoPModel * \ingroup ImplicitTestProblems * \brief Gas injection problem where a gas (here nitrogen) is injected into a fully - * water saturated medium. During buoyancy driven upward migration the gas + * water saturated medium. During buoyancy-driven upward migration the gas * passes a high temperature area. * * The domain is sized 60 m times 40 m. @@ -76,7 +76,7 @@ public: Injection2PNIProblem(std::shared_ptr<const GridGeometry> gridGeometry) : ParentType(gridGeometry) { - // initialize the tables of the fluid system + // Initialize the tables of the fluid system FluidSystem::init(/*tempMin=*/273.15, /*tempMax=*/423.15, /*numTemp=*/50, @@ -84,13 +84,13 @@ public: /*pMax=*/30e6, /*numP=*/300); - // name of the problem and output file + // Name of the problem and output file // getParam<TYPE>("GROUPNAME.PARAMNAME") reads and sets parameter PARAMNAME // of type TYPE given in the group GROUPNAME from the input file name_ = getParam<std::string>("Problem.Name"); - // depth of the aquifer, units: m + // Depth of the aquifer, unit: m aquiferDepth_ = getParam<Scalar>("Problem.AquiferDepth"); - // the duration of the injection, units: second + // The duration of the injection, unit: seconds injectionDuration_ = getParam<Scalar>("Problem.InjectionDuration"); }