Commit 92a65943 authored by Gabi Seitz's avatar Gabi Seitz
Browse files

[1pncmin] improve documentation

parent 2499a1a8
......@@ -67,17 +67,14 @@ public:
}
/*!
* \brief The specific heat capacity \f$\mathrm{[J/molK]}\f$ of CaO.
* \brief The specific heat capacity \f$\mathrm{[J/kg K]}\f$ of CaO.
*/
static Scalar heatCapacity()
{
return 0.0166;
//Literature values:
//Nagel et al. (2014) : 934 J/kgK
// actually 47.719 at T = 500 K cf. http://link.springer.com/chapter/10.1007/10681719_232
return 934; //Nagel et al. (2014) : 934 J/kgK
}
};
} // end namespace
#endif
\ No newline at end of file
#endif
......@@ -67,16 +67,14 @@ public:
}
/*!
* \brief The specific heat capacity \f$\mathrm{[J/molK]}\f$ of CaO2H2.
* \brief The specific heat capacity \f$\mathrm{[J/kgK]}\f$ of CaO2H2.
*/
static Scalar heatCapacity()
{
return 0.0206;//
//Literature:
//Nagel et al. (2014) : 1530 J/kgK
return 0.0206; //Nagel et al. (2014) : 1530 J/kgK
}
};
} // end namespace
#endif
\ No newline at end of file
#endif
......@@ -383,17 +383,12 @@ public:
if (!useComplexRelations){
// for the gas phase assume an ideal gas
// std::cout <<"gasDensity (" << T << ")=" << IdealGas::molarDensity(T, p)
// * fluidState.averageMolarMass(nPhaseIdx)
// / std::max(1e-5, sumMoleFrac) << "\n";
return
IdealGas::molarDensity(T, p)
* fluidState.averageMolarMass(nPhaseIdx)
/ std::max(1e-5, sumMoleFrac);}
else
{
//std::cout <<"gasDensity (" << T << ")=" << H2O::gasDensity(T, fluidState.partialPressure(nPhaseIdx, H2OIdx)) +
// Air::gasDensity(T, fluidState.partialPressure(nPhaseIdx, AirIdx)) << "\n";
return
H2O::gasDensity(T, fluidState.partialPressure(nPhaseIdx, H2OIdx)) +
Air::gasDensity(T, fluidState.partialPressure(nPhaseIdx, AirIdx));
......@@ -443,7 +438,6 @@ public:
}
muResult += fluidState.moleFraction(phaseIdx, i)/sumx * mu[i] / divisor;
}
//std::cout << "simple gasviscosity (T =" << T << ")" << muResult << "\n";
return muResult;
}
......@@ -479,8 +473,6 @@ public:
Scalar result = 0.0;
if(compJIdx == H2OIdx)
result = H2O_Air::gasDiffCoeff(temperature, pressure);
// else if (compJIdx == CaO2H2Idxdx)
// result = 0.12e-9; //Just added to avoid numerical problem. does not have any physical significance
else
DUNE_THROW(Dune::NotImplemented, "Binary diffusion coefficient of components "
<< compIIdx << " and " << compJIdx
......
......@@ -18,7 +18,7 @@
*****************************************************************************/
/**
* \file
* \brief Definition of a problem, for the 1p2c problem:
* \brief Definition of a problem, for the 1pnc problem:
* Component transport of nitrogen dissolved in the water phase.
*/
#ifndef DUMUX_1PNC_TEST_PROBLEM_HH
......@@ -87,7 +87,7 @@ SET_BOOL_PROP(OnePNCTestProblem, ProblemEnableGravity, false);
* \ingroup OnePNCModel
* \ingroup ImplicitTestProblems
*
* \brief Definition of a problem, for the 1p2c problem:
* \brief Definition of a problem, for the 1pnc problem:
* Nitrogen is dissolved in the water phase and
* is transported with the water flow from the left side to the right.
*
......@@ -103,14 +103,11 @@ SET_BOOL_PROP(OnePNCTestProblem, ProblemEnableGravity, false);
* where again Dirichlet boundary conditions are applied. Here, the nitrogen mole
* fraction is set to 0.0 mol/mol.
*
* The model is able to use either mole or mass fractions. The property useMoles can be set to either true or false in the
* problem file. Make sure that the according units are used in the problem setup. The default setting for useMoles is true.
*
* This problem uses the \ref OnePNCModel model.
*
* To run the simulation execute the following line in shell:
* <tt>./test_box1p2c -parameterFile ./test_box1p2c.input</tt> or
* <tt>./test_cc1p2c -parameterFile ./test_cc1p2c.input</tt>
* <tt>./test_box1pnc -parameterFile ./test_box1pnc.input</tt> or
* <tt>./test_cc1pnc -parameterFile ./test_cc1pnc.input</tt>
*/
template <class TypeTag>
class OnePNCTestProblem : public ImplicitPorousMediaProblem<TypeTag>
......
......@@ -19,7 +19,7 @@
/*!
* \file
*
* \brief Definition of the spatial parameters for the 1p2c
* \brief Definition of the spatial parameters for the 1pnc
* outlfow problem.
*/
#ifndef DUMUX_1PNC_TEST_SPATIAL_PARAMS_HH
......@@ -34,8 +34,8 @@ namespace Dumux
* \ingroup OnePNCModel
* \ingroup ImplicitTestProblems
*
* \brief Definition of the spatial parameters for the 1p2c
* outflow problem.
* \brief Definition of the spatial parameters for the 1pnc
* test problem.
*/
template<class TypeTag>
class OnePNCTestSpatialParams : public ImplicitSpatialParamsOneP<TypeTag>
......
......@@ -84,6 +84,7 @@ SET_TYPE_PROP(ThermoChemProblem, SpatialParams, ThermoChemSpatialParams<TypeTag>
*
* To run the simulation execute the following line in shell:
* <tt>./test_box1pncmin</tt>
* <tt>./test_cc1pncmin</tt>
*/
template <class TypeTag>
class ThermoChemProblem : public ImplicitPorousMediaProblem<TypeTag>
......@@ -116,7 +117,6 @@ class ThermoChemProblem : public ImplicitPorousMediaProblem<TypeTag>
//Equation Indices
conti0EqIdx = Indices::conti0EqIdx,
firstTransportEqIdx = Indices::firstTransportEqIdx,
// solidEqIdx = Indices::conti0EqIdx + FluidSystem::numComponents,
// Phase Indices
phaseIdx = FluidSystem::gPhaseIdx,
......@@ -139,10 +139,6 @@ class ThermoChemProblem : public ImplicitPorousMediaProblem<TypeTag>
using SubControlVolume = typename GET_PROP_TYPE(TypeTag, SubControlVolume);
using GlobalPosition = Dune::FieldVector<Scalar, dimWorld>;
// enum { isBox = GET_PROP_VALUE(TypeTag, ImplicitIsBox) };
// enum { dofCodim = isBox ? dim : 0 };
public:
/*!
* \brief The constructor
......@@ -163,6 +159,7 @@ public:
isCharge_ = GET_RUNTIME_PARAM_FROM_GROUP(TypeTag, bool, Problem, IsCharge);
// // initialize, if a complex fluidsystem is used
// FluidSystem::init(/*Tmin=*/temperatureLow_,
// /*Tmax=*/temperatureHigh_,
// /*nT=*/nTemperature_,
......@@ -171,10 +168,6 @@ public:
// /*np=*/nPressure_);
}
/*!
* \name Problem parameters
*/
/*!
* \brief The problem name.
*
......@@ -193,10 +186,7 @@ public:
/*!
* \name Boundary conditions
*/
// \{
/*!
*
* \brief Specifies which kind of boundary condition should be
* used for which equation on a given boundary segment
*
......@@ -280,17 +270,8 @@ public:
* \brief Evaluates the boundary conditions for a Neumann
* boundary segment in dependency on the current solution.
*
* \param values Stores the Neumann values for the conservation equations in
* \f$ [ \textnormal{unit of conserved quantity} / (m^(dim-1) \cdot s )] \f$
* \param element The finite element
* \param fvGeometry The finite volume geometry of the element
* \param intersection The intersection between element and boundary
* \param scvIdx The local index of the sub-control volume
* \param boundaryFaceIdx The index of the boundary face
* \param elemVolVars All volume variables for the element
*
* This method is used for cases, when the Neumann condition depends on the
* solution and requires some quantities that are specific to the fully-implicit method.
* \param priVars stores the Neumann values for the conservation equations in
* \f$ [ \textnormal{unit of conserved quantity} / (m^(dim-1) \cdot s )] \f$
* The \a values store the mass flux of each phase normal to the boundary.
* Negative values indicate an inflow.
*/
......@@ -319,7 +300,7 @@ public:
/*!
* \brief Evaluates the initial values for a control volume
*
* \param values Stores the initial values for the conservation equations in
* \param priVars Stores the initial values for the conservation equations in
* \f$ [ \textnormal{unit of primary variables} ] \f$
* \param globalPos The global position
*/
......@@ -361,11 +342,24 @@ public:
}
/*!
* \brief Return the initial phase state inside a sub control volume.
* \brief Evaluate the source term for all phases within a given
* sub-control-volume.
*
* This is the method for the case where the source term is
* potentially solution dependent and requires some quantities that
* are specific to the fully-implicit method.
*
* \param element The element of the sub control volume
* \param fvGeometry The finite volume geometry
* \param scvIdx The sub control volume index
* \param values The source and sink values for the conservation equations in units of
* \f$ [ \textnormal{unit of conserved quantity} / (m^3 \cdot s )] \f$
* \param element The finite element
* \param fvGeometry The finite-volume geometry
* \param elemVolVars All volume variables for the element
* \param scv The subcontrolvolume
*
* For this method, the \a values parameter stores the conserved quantity rate
* generated or annihilate per volume unit. Positive values mean
* that the conserved quantity is created, negative ones mean that it vanishes.
* E.g. for the mass balance that would be a mass rate in \f$ [ kg / (m^3 \cdot s)] \f$.
*/
PrimaryVariables source(const Element &element,
const FVElementGeometry& fvGeometry,
......@@ -397,13 +391,19 @@ public:
Scalar moleFracH2O_fPhase = volVars.moleFraction(phaseIdx, firstMoleFracIdx);
Scalar moleFracCaO_sPhase = volVars.precipitateVolumeFraction(cPhaseIdx)*volVars.molarDensity(cPhaseIdx)
/(volVars.precipitateVolumeFraction(hPhaseIdx)*volVars.molarDensity(hPhaseIdx)
+ volVars.precipitateVolumeFraction(cPhaseIdx)*volVars.molarDensity(cPhaseIdx));
Scalar moleFracCaO2H2_sPhase = volVars.precipitateVolumeFraction(hPhaseIdx)*volVars.molarDensity(hPhaseIdx)
/(volVars.precipitateVolumeFraction(hPhaseIdx)*volVars.molarDensity(hPhaseIdx)
+ volVars.precipitateVolumeFraction(cPhaseIdx)*volVars.molarDensity(cPhaseIdx));
Scalar moleFracCaO_sPhase = volVars.precipitateVolumeFraction(cPhaseIdx)
*volVars.molarDensity(cPhaseIdx)
/(volVars.precipitateVolumeFraction(hPhaseIdx)
*volVars.molarDensity(hPhaseIdx)
+ volVars.precipitateVolumeFraction(cPhaseIdx)
*volVars.molarDensity(cPhaseIdx));
Scalar moleFracCaO2H2_sPhase = volVars.precipitateVolumeFraction(hPhaseIdx)
*volVars.molarDensity(hPhaseIdx)
/(volVars.precipitateVolumeFraction(hPhaseIdx)
*volVars.molarDensity(hPhaseIdx)
+ volVars.precipitateVolumeFraction(cPhaseIdx)
*volVars.molarDensity(cPhaseIdx));
Scalar deltaH = 112e3; // J/mol
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment