Commit a1a136f1 authored by Philipp Nuske's avatar Philipp Nuske
Browse files

updated / corrected / introduced doxygen documentation

mpncmodelkinetic: 
- ask volVars instead of fluidState for temperature (sPhase is not stored in fluidState)
- add output to checkplausibility

mpnclocalresidualenergy:
removed unused functions 

git-svn-id: svn://svn.iws.uni-stuttgart.de/DUMUX/dumux/trunk@11468 2fb0f335-1f38-0410-981e-8018bf24f1b0
parent 79c15898
......@@ -33,6 +33,7 @@
namespace Dumux {
/*!
* \brief Calculates the diffusive flux in the fully coupled MpNc model.
* Called from the mass module.
*/
template <class TypeTag, bool enableDiffusion>
class MPNCDiffusion
......@@ -50,11 +51,22 @@ class MPNCDiffusion
typedef Dune::FieldVector<Scalar, numComponents> ComponentVector;
public:
/*!
* \brief Calls the function for the diffusion in the gas and liquid phases, respectively.
*
* In the gas phase, the mutual influence of mole fractions can be considered.
*
* \param fluxes The Diffusive flux over the sub-control-volume face for each component
* \param phaseIdx The index of the phase we are calculating the diffusive flux for
* \param fluxVars The flux variables at the current sub control volume face
* \param molarDensity The (molar) density of the phase
*/
static void flux(ComponentVector &fluxes,
const unsigned int phaseIdx,
const FluxVariables &fluxVars,
const Scalar molarDensity )
{
{ // TODO: nPhase does not need to be gas phase.
if (phaseIdx == nPhaseIdx)
gasFlux_(fluxes, fluxVars, molarDensity);
else if (phaseIdx == wPhaseIdx){
......@@ -69,6 +81,14 @@ public:
}
protected:
/*!
* \brief Calculates the diffusive flux in the liquid phase: only Fick diffusion (no mutual influence) is considered.
*
* \param fluxes The Diffusive flux over the sub-control-volume face for each component
* \param fluxVars The flux variables at the current sub control volume face
* \param molarDensity The (molar) density of the phase
*/
static void liquidFlux_(ComponentVector &fluxes,
const FluxVariables &fluxVars,
const Scalar molarDensity)
......@@ -83,6 +103,15 @@ protected:
}
}
/*!
* \brief Calculates the diffusive flux in the gas phase:
* The property UseMaxwellDiffusion selects whether Maxwell or Fick diffusion is applied.
* Has to be the same for a 2-component system. However, Maxwells does not work always.
*
* \param fluxes The Diffusive flux over the sub-control-volume face for each component
* \param fluxVars The flux variables at the current sub control volume face
* \param molarDensity The (molar) density of the phase
*/
static void gasFlux_(ComponentVector &fluxes,
const FluxVariables &fluxVars,
const Scalar molarDensity)
......
......@@ -86,36 +86,6 @@ public:
{
// do nothing, we're isothermal!
}
/*!
* \brief the advective Flux of the enthalpy
*
* \param enthalpyFlux advective Flux of the enthalpy
* \param phaseIdx The local index of the phases
* \param compMolFlux
* \param volVars the Volume Variables
* \param fluxVars the flux Variables
*/
static void phaseEnthalpyFlux(PrimaryVariables &enthalpyFlux,
const unsigned int phaseIdx,
const PrimaryVariables &compMolFlux,
const ElementVolumeVariables &volVars,
const FluxVariables &fluxVars)
{
// do nothing, we're isothermal!
}
/*!
* \brief The heat conduction in the phase
*
* \param heatConduction
* \param volVars the Volume Variables
* \param fluxVars the flux Variables
*/
static void heatConduction(PrimaryVariables &heatConduction,
const ElementVolumeVariables &volVars,
const FluxVariables &fluxVars)
{
// do nothing, we're isothermal!
}
/*!
* \brief Evaluates the total flux of all conservation quantities
......@@ -124,7 +94,7 @@ public:
* \param flux The flux over the SCV (sub-control-volume) face for each component
* \param fluxVars The flux variables
* \param volVars The volume variables
* \param molarPhaseComponentValuesMassTransport
* \param molarPhaseComponentValuesMassTransport The component-wise flux within a phase. Needed for energy transport.
*/
static void computeFlux(PrimaryVariables & flux,
const FluxVariables & fluxVars,
......@@ -137,8 +107,9 @@ public:
* \brief Calculate the source term of the equation
*
* \param source The source/sink in the sub-control volume for each component
* \param componentIntoPhaseMassTransfer
* \param volVars The volume variables
* \param componentIntoPhaseMassTransfer The component-wise transfer from one phase. Needed for energy transfer.
*
*/
static void computeSource(PrimaryVariables &source,
const VolumeVariables &volVars,
......@@ -223,7 +194,7 @@ public:
* \param flux The flux over the SCV (sub-control-volume) face for each component
* \param fluxVars The flux Variables
* \param elemVolVars The volume variables of the current element
* \param molarPhaseComponentValuesMassTransport
* \param molarPhaseComponentValuesMassTransport The component-wise flux within a phase. Needed for energy transport.
*/
static void computeFlux(PrimaryVariables & flux,
const FluxVariables & fluxVars,
......@@ -246,12 +217,12 @@ public:
elemVolVars);
}
/*!
* \brief the advective Flux of the enthalpy
* \brief The advective Flux of the enthalpy
* \param flux The flux over the SCV (sub-control-volume) face for each component
* \param fluxVars The flux Variables
* \param elemVolVars The volume variables of the current element
* \param phaseIdx The local index of the phases
* \param molarComponentValuesMassTransport
* \param molarComponentValuesMassTransport The component-wise flux in the current phase. Needed for energy transport.
*/
static void computePhaseEnthalpyFlux(PrimaryVariables & flux,
const FluxVariables & fluxVars,
......@@ -280,7 +251,6 @@ public:
* \param flux The flux over the SCV (sub-control-volume) face for each component
* \param fluxVars The flux Variables
* \param elemVolVars The volume variables of the current element
*
*/
static void computeHeatConduction(PrimaryVariables & flux,
const FluxVariables & fluxVars,
......@@ -298,9 +268,8 @@ public:
*
* \param source The source/sink in the sub-control volume for each component
* \param volVars The volume variables
* \param componentIntoPhaseMassTransfer
* \param componentIntoPhaseMassTransfer The component-wise transfer from one phase. Needed for energy transfer.
*/
static void computeSource(PrimaryVariables &source,
const VolumeVariables &volVars,
const ComponentVector componentIntoPhaseMassTransfer[numPhases])
......@@ -309,10 +278,6 @@ public:
}
};
}
#endif // DUMUX_MPNC_ENERGY_HH
......@@ -88,7 +88,7 @@ public:
* \param element The finite element
* \param fvGeometry The finite-volume geometry in the fully implicit scheme
* \param elemVolVars The volume variables of the current element
* \param elemBcTypes
* \param elemBcTypes The types of the boundary conditions for all vertices of the element
*/
void processElement(const Element &element,
const FVElementGeometry &fvGeometry,
......@@ -179,7 +179,7 @@ public:
* \param element The finite element
* \param fvGeometry The finite-volume geometry in the fully implicit scheme
* \param elemVolVars The volume variables of the current element
* \param elemBcTypes
* \param elemBcTypes The types of the boundary conditions for all vertices of the element
*/
void processElement(const Element &element,
const FVElementGeometry &fvGeometry,
......
......@@ -70,7 +70,7 @@ public:
* \param fs Container for all the secondary variables concerning the fluids
* \param paramCache Container for cache parameters
* \param priVars The primary Variables
* \param *hint the volume variables
* \param *hint the volume variables, usable for initial guess of composition
* \param problem The problem
* \param element The finite element
* \param fvGeometry The finite-volume geometry in the fully implicit scheme
......
......@@ -78,7 +78,7 @@ public:
* \param actualFluidState Container for all the secondary variables concerning the fluids
* \param paramCache Container for cache parameters
* \param priVars The primary Variables
* \param *hint the volume variables
* \param *hint the volume variables, usable for initial guess of composition
* \param problem The problem
* \param element The finite element
* \param fvGeometry The finite-volume geometry in the fully implicit scheme
......
......@@ -86,7 +86,7 @@ public:
* \param element The finite element
* \param fvGeometry The finite-volume geometry in the fully implicit scheme
* \param elemVolVars The volume variables of the current element
* \param elemBcTypes
* \param elemBcTypes The types of the boundary conditions for all vertices of the element
*/
void processElement(const Element &element,
const FVElementGeometry &fvGeometry,
......
......@@ -97,7 +97,7 @@ public:
* \param element The finite element
* \param fvGeometry The finite-volume geometry in the fully implicit scheme
* \param elemVolVars The volume variables of the current element
* \param elemBcTypes
* \param elemBcTypes The types of the boundary conditions for all vertices of the element
*/
void processElement(const Element &element,
const FVElementGeometry &fvGeometry,
......
......@@ -111,7 +111,7 @@ public:
* (e.g. phase mass) within all sub-control volumes of an
* element.
*
* \param phaseStorage The mass of the component within the phase
* \param phaseStorage The conserved quantity within the phase in the whole domain
* \param element The finite element
* \param phaseIdx The index of the fluid phase
*/
......@@ -234,7 +234,7 @@ public:
* \param fvGeometry The finite-volume geometry in the fully implicit scheme
* \param prevVolVars The volume variables of the previous timestep
* \param curVolVars The volume variables of the current timestep
* \param bcType
* \param bcType The types of the boundary conditions for all vertices of the element
*/
void eval(const Element &element,
const FVElementGeometry &fvGeometry,
......
......@@ -157,7 +157,7 @@ public:
* \brief Compute the total storage inside one phase of all
* conservation quantities.
*
* \param phaseStorage
* \param phaseStorage The conserved quantity within the phase in the whole domain
* \param phaseIdx The local index of the phases
*/
void globalPhaseStorage(PrimaryVariables &phaseStorage, const unsigned int phaseIdx)
......
......@@ -219,7 +219,7 @@ public:
// energy check
for(unsigned int energyEqIdx=0; energyEqIdx<numEnergyEqs; energyEqIdx++){
const Scalar eps = 1e-6 ;
const Scalar temperatureTest = fluidState.temperature(energyEqIdx);
const Scalar temperatureTest = elemVolVars[scvIdx].temperature(energyEqIdx);
if (not std::isfinite(temperatureTest) or temperatureTest < 0.-eps ){
message <<"\nUnphysical Value in Energy: \n";
message << "\tT" <<"_"<<FluidSystem::phaseName(energyEqIdx)<<"="<< temperatureTest <<"\n";
......@@ -254,6 +254,10 @@ public:
message << "\tia" <<FluidSystem::phaseName(phaseIdxI)
<<FluidSystem::phaseName(phaseIdxII)<<"="
<< ia << "\n" ;
message << "\t S[0]=" << fluidState.saturation(0);
message << "\t S[1]=" << fluidState.saturation(1);
message << "\t p[0]=" << fluidState.pressure(0);
message << "\t p[1]=" << fluidState.pressure(1);
}
}
}
......
......@@ -108,7 +108,7 @@ public:
* \param element The finite element
* \param fvGeometry The finite-volume geometry in the fully implicit scheme
* \param scvIdx The index of the sub-control volume
* \param isOldSol
* \param isOldSol Specifies whether this is the previous solution or the current one
*/
void update(const PrimaryVariables &priVars,
const Problem &problem,
......@@ -330,7 +330,7 @@ public:
* present.
*
* \param phaseIdx The local index of the phases
* \param fluisState Container for all the secondary variables concerning the fluids
* \param fluidState Container for all the secondary variables concerning the fluids
*/
Scalar phasePresentIneq(const FluidState &fluidState,
const unsigned int phaseIdx) const
......@@ -341,7 +341,7 @@ public:
* present.
*
* \param phaseIdx The local index of the phases
* \param fluisState Container for all the secondary variables concerning the fluids
* \param fluidState Container for all the secondary variables concerning the fluids
*/
Scalar phaseNotPresentIneq(const FluidState &fluidState,
const unsigned int phaseIdx) const
......
......@@ -65,7 +65,7 @@ public:
* \brief Updates the volume specific interfacial area [m^2 / m^3] between the phases.
*
* \param volVars The volume variables
* \param fluisState Container for all the secondary variables concerning the fluids
* \param fluidState Container for all the secondary variables concerning the fluids
* \param paramCache Container for cache parameters
* \param priVars The primary Variables
* \param problem The problem
......
......@@ -121,7 +121,7 @@ public:
* \param element The finite element
* \param fvGeometry The finite-volume geometry in the fully implicit scheme
* \param elemVolVars The volume variables of the current element
* \param elemBcTypes
* \param elemBcTypes The types of the boundary conditions for all vertices of the element
*/
void processElement(const Element &element,
const FVElementGeometry &fvGeometry,
......
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