Commit 509c42ba authored by Thomas Fetzer's avatar Thomas Fetzer
Browse files

[non-isothermal]

update to the generic non-isothermal model

adjusted:
 - 1p model
 - 3p model
 - 1p test (including 1pni tests)
 - 1p2c test (including 1p2cni tests)
 - 2p2c test (including 2p2cni tests)
 - 3p test (including 3pni tests)
 - 3p3c test (including 3p3cpni tests)
 - new ctest for kuevette problem

updated:
 - SET_TYPE_PROP instead of SET_PROP
 - documentation of non-isothermal problems
 - solution for 2pinjectionproblem (now with simplex grid)
 - version number in one start message

deleted:
 - old non-isothermal test folders
 - whitespace at end of configure.ac lines

created and reviewed by kissinger and fetzer




git-svn-id: svn://svn.iws.uni-stuttgart.de/DUMUX/dumux/trunk@13825 2fb0f335-1f38-0410-981e-8018bf24f1b0
parent 87334751
......@@ -13,6 +13,10 @@ Differences Between DuMuX 2.6 and DuMuX 2.7
member functions, which have been deprecated in DuMuX 2.6:
Everything listed as deprecated below has been removed.
* DELETED non-isothermal folders in dumux/implicit and test/implicit. A
non-isothermal test case can now be set up with the generic non-isothermal model,
see changes between (2.5 and 2.6)
Differences Between DuMuX 2.5 and DuMuX 2.6
===================================================
......
......@@ -11,27 +11,27 @@ DUMUX_CHECKS_PRIVATE
AC_CONFIG_FILES([dumux.pc
Makefile
doc/Makefile
doc/doxygen/Makefile
doc/Makefile
doc/doxygen/Makefile
doc/doxygen/Doxyfile
doc/handbook/Makefile
dumux/Makefile
dumux/common/Makefile
dumux/common/Makefile
dumux/decoupled/Makefile
dumux/decoupled/1p/Makefile
dumux/decoupled/1p/diffusion/Makefile
dumux/decoupled/1p/diffusion/fv/Makefile
dumux/decoupled/2p/Makefile
dumux/decoupled/2p/diffusion/Makefile
dumux/decoupled/2p/diffusion/fv/Makefile
dumux/decoupled/1p/diffusion/fv/Makefile
dumux/decoupled/2p/Makefile
dumux/decoupled/2p/diffusion/Makefile
dumux/decoupled/2p/diffusion/fv/Makefile
dumux/decoupled/2p/diffusion/fvmpfa/Makefile
dumux/decoupled/2p/diffusion/fvmpfa/lmethod/Makefile
dumux/decoupled/2p/diffusion/fvmpfa/omethod/Makefile
dumux/decoupled/2p/diffusion/mimetic/Makefile
dumux/decoupled/2p/impes/Makefile
dumux/decoupled/2p/transport/Makefile
dumux/decoupled/2p/diffusion/fvmpfa/omethod/Makefile
dumux/decoupled/2p/diffusion/mimetic/Makefile
dumux/decoupled/2p/impes/Makefile
dumux/decoupled/2p/transport/Makefile
dumux/decoupled/2p/transport/fv/Makefile
dumux/decoupled/2p2c/Makefile
dumux/decoupled/2p2c/Makefile
dumux/decoupled/common/Makefile
dumux/decoupled/common/fv/Makefile
dumux/decoupled/common/fv/mpfa/Makefile
......@@ -44,66 +44,63 @@ AC_CONFIG_FILES([dumux.pc
dumux/geomechanics/elastic/Makefile
dumux/geomechanics/el1p2c/Makefile
dumux/geomechanics/el2p/Makefile
dumux/implicit/Makefile
dumux/implicit/1p/Makefile
dumux/implicit/1p2c/Makefile
dumux/implicit/2p/Makefile
dumux/implicit/2p2c/Makefile
dumux/implicit/2pdfm/Makefile
dumux/implicit/3p/Makefile
dumux/implicit/3p3c/Makefile
dumux/implicit/box/Makefile
dumux/implicit/cellcentered/Makefile
dumux/implicit/common/Makefile
dumux/implicit/Makefile
dumux/implicit/1p/Makefile
dumux/implicit/1p2c/Makefile
dumux/implicit/2p/Makefile
dumux/implicit/2p2c/Makefile
dumux/implicit/2pdfm/Makefile
dumux/implicit/3p/Makefile
dumux/implicit/3p3c/Makefile
dumux/implicit/box/Makefile
dumux/implicit/cellcentered/Makefile
dumux/implicit/common/Makefile
dumux/implicit/co2/Makefile
dumux/implicit/nonisothermal/Makefile
dumux/implicit/mpnc/Makefile
dumux/implicit/mpnc/Makefile
dumux/implicit/mpnc/diffusion/Makefile
dumux/implicit/mpnc/energy/Makefile
dumux/implicit/mpnc/mass/Makefile
dumux/implicit/richards/Makefile
dumux/implicit/richards/Makefile
dumux/io/Makefile
dumux/linear/Makefile
dumux/material/Makefile
dumux/material/binarycoefficients/Makefile
dumux/material/components/Makefile
dumux/material/components/iapws/Makefile
dumux/material/Makefile
dumux/material/binarycoefficients/Makefile
dumux/material/components/Makefile
dumux/material/components/iapws/Makefile
dumux/material/fluidmatrixinteractions/Makefile
dumux/material/fluidmatrixinteractions/1p/Makefile
dumux/material/fluidmatrixinteractions/2p/Makefile
dumux/material/fluidmatrixinteractions/2pia/Makefile
dumux/material/fluidmatrixinteractions/3p/Makefile
dumux/material/fluidmatrixinteractions/mp/Makefile
dumux/material/spatialparams/Makefile
dumux/material/fluidstates/Makefile
dumux/material/fluidsystems/Makefile
dumux/material/constraintsolvers/Makefile
dumux/material/eos/Makefile
dumux/multidomain/Makefile
dumux/multidomain/2cstokes2p2c/Makefile
dumux/multidomain/2cnistokes2p2cni/Makefile
dumux/multidomain/common/Makefile
dumux/multidomain/couplinglocalresiduals/Makefile
dumux/material/fluidmatrixinteractions/1p/Makefile
dumux/material/fluidmatrixinteractions/2p/Makefile
dumux/material/fluidmatrixinteractions/2pia/Makefile
dumux/material/fluidmatrixinteractions/3p/Makefile
dumux/material/fluidmatrixinteractions/mp/Makefile
dumux/material/spatialparams/Makefile
dumux/material/fluidstates/Makefile
dumux/material/fluidsystems/Makefile
dumux/material/constraintsolvers/Makefile
dumux/material/eos/Makefile
dumux/multidomain/Makefile
dumux/multidomain/2cstokes2p2c/Makefile
dumux/multidomain/2cnistokes2p2cni/Makefile
dumux/multidomain/common/Makefile
dumux/multidomain/couplinglocalresiduals/Makefile
dumux/nonlinear/Makefile
dumux/parallel/Makefile
dumux/parallel/Makefile
m4/Makefile
patches/Makefile
test/Makefile
test/implicit/Makefile
test/implicit/1p/Makefile
test/implicit/2p/Makefile
test/implicit/2pni/Makefile
test/implicit/1p2c/Makefile
test/implicit/Makefile
test/implicit/1p/Makefile
test/implicit/1p2c/Makefile
test/implicit/2p/Makefile
test/implicit/2p2c/Makefile
test/implicit/2p2cni/Makefile
test/implicit/2pdfm/Makefile
test/implicit/3p/Makefile
test/implicit/3p3c/Makefile
test/implicit/3p3cni/Makefile
test/implicit/co2/Makefile
test/implicit/co2ni/Makefile
test/implicit/mpnc/Makefile
test/implicit/richards/Makefile
test/implicit/richards/Makefile
test/common/Makefile
test/common/generalproblem/Makefile
test/common/propertysystem/Makefile
......@@ -137,7 +134,7 @@ AC_CONFIG_FILES([dumux.pc
# implicitly set the Dune-flags everywhere
# we need single quotes, and $(..) here because top_srcdir is only defined in the Makefile
# and not in configure
AC_SUBST(AM_CPPFLAGS, '-I$(top_srcdir) $(ALL_PKG_CPPFLAGS)' )
AC_SUBST(AM_CPPFLAGS, '-I$(top_srcdir) $(ALL_PKG_CPPFLAGS)' )
AC_SUBST(AM_LDFLAGS, "$ALL_PKG_LDFLAGS" )
LIBS="$DUNE_LIBS $ALL_PKG_LIBS"
......
......@@ -215,7 +215,7 @@ void dumuxMessage_(bool start)
std::cout << " ### # @ @ @@ @@ @ " << std::endl;
std::cout << " ## # @ @ @ @ @ @ @ @ @ @ @" << std::endl;
std::cout << " ## # @ @ @ @ @ @ @ @ " << std::endl;
std::cout << " # # @@@@ @@@ @ @ @@@ 2.6" << std::endl;
std::cout << " # # @@@@ @@@ @ @ @@@ 2.7" << std::endl;
std::cout << " # # " << std::endl;
std::cout << " # # " << std::endl;
std::cout << " # ## %%% " << std::endl;
......
......@@ -38,7 +38,7 @@ namespace Dumux
template<class TypeTag>
class OnePLocalResidual : public GET_PROP_TYPE(TypeTag, BaseLocalResidual)
{
typedef OnePLocalResidual<TypeTag> ThisType;
typedef typename GET_PROP_TYPE(TypeTag, LocalResidual) Implementation;
typedef typename GET_PROP_TYPE(TypeTag, Scalar) Scalar;
typedef typename GET_PROP_TYPE(TypeTag, PrimaryVariables) PrimaryVariables;
......@@ -109,6 +109,19 @@ public:
this->curVolVars_(),
onBoundary);
asImp_()->computeAdvectiveFlux(flux, fluxVars);
asImp_()->computeDiffusiveFlux(flux, fluxVars);
}
/*!
* \brief Evaluate the advective mass flux of all components over
* a face of a sub-control volume.
*
* \param flux The advective flux over the sub-control-volume face for each component
* \param fluxVars The flux variables at the current SCV
*/
void computeAdvectiveFlux(PrimaryVariables &flux, const FluxVariables &fluxVars) const
{
const VolumeVariables &up = this->curVolVars_(fluxVars.upstreamIdx(/*phaseIdx=*/0));
const VolumeVariables &dn = this->curVolVars_(fluxVars.downstreamIdx(/*phaseIdx=*/0));
flux[conti0EqIdx] =
......@@ -119,6 +132,19 @@ public:
fluxVars.volumeFlux(/*phaseIdx=*/0);
}
/*!
* \brief Adds the diffusive mass flux of all components over
* a face of a sub-control volume.
*
* \param flux The diffusive flux over the sub-control-volume face for each component
* \param fluxVars The flux variables at the current SCV
*/
void computeDiffusiveFlux(PrimaryVariables &flux, const FluxVariables &fluxVars) const
{
// diffusive fluxes
flux += 0.0;
}
/*!
* \brief Calculate the source term of the equation.
*
......@@ -144,11 +170,11 @@ public:
{ return this->problem_.temperature(); /* constant temperature */ }
private:
ThisType &asImp_()
{ return *static_cast<ThisType *>(this); }
Implementation *asImp_()
{ return static_cast<Implementation *> (this); }
const ThisType &asImp_() const
{ return *static_cast<const ThisType *>(this); }
const Implementation *asImp_() const
{ return static_cast<const Implementation *> (this); }
Scalar upwindWeight_;
};
......
......@@ -24,11 +24,12 @@
*
* \brief Defines the properties required for the one-phase fully implicit model.
*/
#ifndef DUMUX_1P_PROPERTIES_DATA_HH
#define DUMUX_1P_PROPERTIES_DATA_HH
#ifndef DUMUX_1P_PROPERTIES_HH
#define DUMUX_1P_PROPERTIES_HH
#include <dumux/implicit/box/boxproperties.hh>
#include <dumux/implicit/cellcentered/ccproperties.hh>
#include <dumux/implicit/nonisothermal/niproperties.hh>
namespace Dumux
{
......@@ -47,6 +48,11 @@ NEW_TYPE_TAG(OneP);
NEW_TYPE_TAG(BoxOneP, INHERITS_FROM(BoxModel, OneP));
NEW_TYPE_TAG(CCOneP, INHERITS_FROM(CCModel, OneP));
//! The type tags for the corresponding non-isothermal problems
NEW_TYPE_TAG(OnePNI, INHERITS_FROM(OneP, NonIsothermal));
NEW_TYPE_TAG(BoxOnePNI, INHERITS_FROM(BoxModel, OnePNI));
NEW_TYPE_TAG(CCOnePNI, INHERITS_FROM(CCModel, OnePNI));
//////////////////////////////////////////////////////////////////
// Property tags
//////////////////////////////////////////////////////////////////
......
......@@ -27,19 +27,21 @@
#ifndef DUMUX_1P_PROPERTY_DEFAULTS_HH
#define DUMUX_1P_PROPERTY_DEFAULTS_HH
#include <dumux/implicit/box/boxproperties.hh>
#include "1pproperties.hh"
#include "1pmodel.hh"
#include "1plocalresidual.hh"
#include "1pvolumevariables.hh"
#include "1pindices.hh"
#include <dumux/implicit/nonisothermal/nipropertydefaults.hh>
#include <dumux/material/fluidsystems/gasphase.hh>
#include <dumux/material/fluidsystems/liquidphase.hh>
#include <dumux/material/components/nullcomponent.hh>
#include <dumux/material/fluidsystems/1pfluidsystem.hh>
#include <dumux/material/spatialparams/implicitspatialparams1p.hh>
#include <dumux/implicit/common/implicitdarcyfluxvariables.hh>
#include <dumux/material/fluidmatrixinteractions/1p/thermalconductivityaverage.hh>
namespace Dumux
{
......@@ -49,25 +51,23 @@ namespace Dumux
// default property values for the isothermal single phase model
///////////////////////////////////////////////////////////////////////////
namespace Properties {
SET_INT_PROP(OneP, NumEq, 1); //!< set the number of equations to 1
SET_INT_PROP(OneP, NumEq, GET_PROP_VALUE(TypeTag, IsothermalNumEq)); //!< set the number of equations to 1
SET_INT_PROP(OneP, NumPhases, 1); //!< The number of phases in the 1p model is 1
//! The local residual function
SET_TYPE_PROP(OneP,
LocalResidual,
OnePLocalResidual<TypeTag>);
SET_TYPE_PROP(OneP, LocalResidual, typename GET_PROP_TYPE(TypeTag, IsothermalLocalResidual));
//! the Model property
SET_TYPE_PROP(OneP, Model, OnePModel<TypeTag>);
SET_TYPE_PROP(OneP, Model, typename GET_PROP_TYPE(TypeTag, IsothermalModel));
//! the VolumeVariables property
SET_TYPE_PROP(OneP, VolumeVariables, OnePVolumeVariables<TypeTag>);
SET_TYPE_PROP(OneP, VolumeVariables, typename GET_PROP_TYPE(TypeTag, IsothermalVolumeVariables));
//! the FluxVariables property
SET_TYPE_PROP(OneP, FluxVariables, ImplicitDarcyFluxVariables<TypeTag>);
SET_TYPE_PROP(OneP, FluxVariables, typename GET_PROP_TYPE(TypeTag, IsothermalFluxVariables));
//! The indices required by the isothermal single-phase model
SET_TYPE_PROP(OneP, Indices, OnePIndices);
SET_TYPE_PROP(OneP, Indices, typename GET_PROP_TYPE(TypeTag, IsothermalIndices));
//! The spatial parameters to be employed.
//! Use ImplicitSpatialParamsOneP by default.
......@@ -104,6 +104,36 @@ SET_BOOL_PROP(OneP, ProblemEnableGravity, true);
// (Nield, Bejan, Convection in porous media, 2006, p. 10)
SET_SCALAR_PROP(BoxModel, SpatialParamsForchCoeff, 0.55);
//! average is used as default model to compute the effective thermal heat conductivity
SET_PROP(NonIsothermal, ThermalConductivityModel)
{ private :
typedef typename GET_PROP_TYPE(TypeTag, Scalar) Scalar;
public:
typedef ThermalConductivityAverage<Scalar> type;
};
//////////////////////////////////////////////////////////////////
// Property values for isothermal model required for the general non-isothermal model
//////////////////////////////////////////////////////////////////
// set isothermal Model
SET_TYPE_PROP(OneP, IsothermalModel, OnePModel<TypeTag>);
//set isothermal FluxVariables
SET_TYPE_PROP(OneP, IsothermalFluxVariables, ImplicitDarcyFluxVariables<TypeTag>);
//set isothermal VolumeVariables
SET_TYPE_PROP(OneP, IsothermalVolumeVariables, OnePVolumeVariables<TypeTag>);
//set isothermal LocalResidual
SET_TYPE_PROP(OneP, IsothermalLocalResidual, OnePLocalResidual<TypeTag>);
//set isothermal Indices
SET_TYPE_PROP(OneP, IsothermalIndices, OnePIndices);
//set isothermal NumEq
SET_INT_PROP(OneP, IsothermalNumEq, 1);
// \}
} // end namespace Properties
......
......@@ -93,6 +93,7 @@ public:
Scalar t = Implementation::temperature_(priVars, problem, element,
fvGeometry, scvIdx);
fluidState.setTemperature(t);
fluidState.setSaturation(/*phaseIdx=*/0, 1.);
fluidState.setPressure(/*phaseIdx=*/0, priVars[Indices::pressureIdx]);
......@@ -104,11 +105,15 @@ public:
typename FluidSystem::ParameterCache paramCache;
paramCache.updatePhase(fluidState, /*phaseIdx=*/0);
Scalar value = FluidSystem::density(fluidState, paramCache, /*phaseIdx=*/0);
Scalar value = FluidSystem::density(fluidState, paramCache, /*phaseIdx=*/0);
fluidState.setDensity(/*phaseIdx=*/0, value);
value = FluidSystem::viscosity(fluidState, paramCache, /*phaseIdx=*/0);
value = FluidSystem::viscosity(fluidState, paramCache, /*phaseIdx=*/0);
fluidState.setViscosity(/*phaseIdx=*/0, value);
// compute and set the enthalpy
value = Implementation::enthalpy_(fluidState, paramCache, /*phaseIdx=*/0);
fluidState.setEnthalpy(/*phaseIdx=*/0, value);
}
/*!
......@@ -176,6 +181,14 @@ protected:
return problem.temperatureAtPos(fvGeometry.subContVol[scvIdx].global);
}
template<class ParameterCache>
static Scalar enthalpy_(const FluidState& fluidState,
const ParameterCache& paramCache,
const int phaseIdx)
{
return 0;
}
/*!
* \brief Called by update() to compute the energy related quantities.
*/
......
......@@ -30,9 +30,9 @@
#define DUMUX_1P2C_PROPERTIES_HH
#include<dumux/implicit/box/boxproperties.hh>
#include<dumux/implicit/cellcentered/ccproperties.hh>
#include<dumux/implicit/nonisothermal/niproperties.hh>
#include <dumux/implicit/box/boxproperties.hh>
#include <dumux/implicit/cellcentered/ccproperties.hh>
#include <dumux/implicit/nonisothermal/niproperties.hh>
namespace Dumux
{
......
......@@ -30,7 +30,6 @@
#define DUMUX_1P2C_PROPERTY_DEFAULTS_HH
#include "1p2cproperties.hh"
#include "1p2cmodel.hh"
#include "1p2clocalresidual.hh"
#include "1p2cvolumevariables.hh"
......
......@@ -32,7 +32,7 @@
#include <dumux/implicit/box/boxproperties.hh>
#include <dumux/implicit/cellcentered/ccproperties.hh>
#include<dumux/implicit/nonisothermal/niproperties.hh>
#include <dumux/implicit/nonisothermal/niproperties.hh>
namespace Dumux
{
......
......@@ -32,7 +32,6 @@
#include "2pmodel.hh"
#include "2pindices.hh"
#include "2pvolumevariables.hh"
#include "2pproperties.hh"
#include "2plocalresidual.hh"
#include <dumux/implicit/nonisothermal/nipropertydefaults.hh>
......
......@@ -113,6 +113,7 @@ public:
flux = 0;
asImp_()->computeAdvectiveFlux(flux, fluxVars);
asImp_()->computeDiffusiveFlux(flux, fluxVars);
}
/*!
......
......@@ -29,6 +29,7 @@
#include <dumux/implicit/box/boxproperties.hh>
#include <dumux/implicit/cellcentered/ccproperties.hh>
#include <dumux/implicit/nonisothermal/niproperties.hh>
namespace Dumux
{
......@@ -38,12 +39,17 @@ namespace Properties
//////////////////////////////////////////////////////////////////
// Type tags
//////////////////////////////////////////////////////////////////
//! The type tags for the implicit three-phase problems
//! The type tags for the implicit isothermal one-phase two-component problems
NEW_TYPE_TAG(ThreeP);
NEW_TYPE_TAG(BoxThreeP, INHERITS_FROM(BoxModel, ThreeP));
NEW_TYPE_TAG(CCThreeP, INHERITS_FROM(CCModel, ThreeP));
//! The type tags for the corresponding non-isothermal problems
NEW_TYPE_TAG(ThreePNI, INHERITS_FROM(ThreeP, NonIsothermal));
NEW_TYPE_TAG(BoxThreePNI, INHERITS_FROM(BoxModel, ThreePNI));
NEW_TYPE_TAG(CCThreePNI, INHERITS_FROM(CCModel, ThreePNI));
//////////////////////////////////////////////////////////////////
// Property tags
//////////////////////////////////////////////////////////////////
......
......@@ -36,10 +36,12 @@
#include "3pproperties.hh"
#include "3plocalresidual.hh"
#include <dumux/implicit/nonisothermal/nipropertydefaults.hh>
#include <dumux/implicit/common/implicitdarcyfluxvariables.hh>
#include <dumux/material/spatialparams/implicitspatialparams.hh>
#include <dumux/material/fluidstates/immisciblefluidstate.hh>
#include <dumux/implicit/common/implicitdarcyfluxvariables.hh>
#include <dumux/material/fluidmatrixinteractions/3p/thermalconductivitysomerton3p.hh>
namespace Dumux
......@@ -94,7 +96,7 @@ SET_SCALAR_PROP(ThreeP, ImplicitMassUpwindWeight, 1.0);
SET_SCALAR_PROP(ThreeP, ImplicitMobilityUpwindWeight, 1.0);
//! The indices required by the isothermal 3p model
SET_TYPE_PROP(ThreeP, Indices, ThreePIndices<TypeTag, /*PVOffset=*/0>);
SET_TYPE_PROP(ThreeP, Indices, ThreePIndices<TypeTag,/*PVOffset=*/0>);
//! The spatial parameters to be employed.
//! Use ImplicitSpatialParams by default.
......@@ -115,6 +117,41 @@ SET_BOOL_PROP(ThreeP, VtkAddVelocity, false);
// enable gravity by default
SET_BOOL_PROP(ThreeP, ProblemEnableGravity, true);
//! Somerton is used as default model to compute the effective thermal heat conductivity
SET_PROP(NonIsothermal, ThermalConductivityModel)
{
private:
typedef typename GET_PROP_TYPE(TypeTag, Scalar) Scalar;
typedef typename GET_PROP_TYPE(TypeTag, Indices) Indices;
public:
typedef ThermalConductivitySomerton<Scalar, Indices> type;
};
//! temperature is already written by the isothermal model
SET_BOOL_PROP(ThreePNI, NiOutputLevel, 0);
//////////////////////////////////////////////////////////////////
// Property values for isothermal model required for the general non-isothermal model
//////////////////////////////////////////////////////////////////
// set isothermal Model
SET_TYPE_PROP(ThreePNI, IsothermalModel, ThreePModel<TypeTag>);
// set isothermal FluxVariables
SET_TYPE_PROP(ThreePNI, IsothermalFluxVariables, ImplicitDarcyFluxVariables<TypeTag>);
//set isothermal VolumeVariables
SET_TYPE_PROP(ThreePNI, IsothermalVolumeVariables, ThreePVolumeVariables<TypeTag>);
//set isothermal LocalResidual
SET_TYPE_PROP(ThreePNI, IsothermalLocalResidual, ThreePLocalResidual<TypeTag>);
//set isothermal Indices
SET_TYPE_PROP(ThreePNI, IsothermalIndices, ThreePIndices<TypeTag,/*PVOffset=*/0>);
//set isothermal NumEq
SET_INT_PROP(ThreePNI, IsothermalNumEq, 3);
}
}
......
......@@ -170,7 +170,13 @@ public:
Valgrind::CheckDefined(permeability_);
// energy related quantities not contained in the fluid state
typename FluidSystem::ParameterCache paramCache;
asImp_().updateEnergy_(priVars, problem, element, fvGeometry, scvIdx, isOldSol);
for (int phaseIdx = 0; phaseIdx < numPhases; ++phaseIdx) {
// compute and set the enthalpy
Scalar h = asImp_().enthalpy_(fluidState_, paramCache, phaseIdx);
fluidState_.setEnthalpy(phaseIdx, h);
}
}
/*!
......@@ -256,6 +262,14 @@ protected:
return problem.temperatureAtPos(fvGeometry.subContVol[scvIdx].global);
}
template<class ParameterCache>
static Scalar enthalpy_(const FluidState& fluidState,
const ParameterCache& paramCache,
const int phaseIdx)
{
return 0;
}
/*!
* \brief Called by update() to compute the energy related quantities
*/
......
// -*- mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
// vi: set et ts=4 sw=4 sts=4:
/*****************************************************************************
* See the file COPYING for full copying permissions. *
* *
* This program is free software: you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation, either version 2 of the License, or *
* (at your option) any later version. *
* *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* along with this program. If not, see <http://www.gnu.org/licenses/>. *
*****************************************************************************/
/**
* \file
* \brief Test for the OnePModel in combination with the NI model for a conduction problem:
* The simulation domain is a tube where with an elevated temperature on the left hand side.
*/
#ifndef DUMUX_1PNI_CONDUCTION_PROBLEM_HH
#define DUMUX_1PNI_CONDUCTION_PROBLEM_HH
#include <math.h>
#include <dune/grid/io/file/dgfparser/dgfyasp.hh>
#include <dumux/implicit/1p/1pmodel.hh>
#include <dumux/implicit/common/implicitporousmediaproblem.hh>
#include <dumux/material/components/h2o.hh>
#include <dumux/material/fluidmatrixinteractions/1p/thermalconductivityaverage.hh>
#include "1pnispatialparams.hh"
namespace Dumux
{
template <class TypeTag>
class OnePNIConductionProblem;
namespace Properties
{
NEW_TYPE_TAG(OnePNIConductionProblem, INHERITS_FROM(OnePNI));
NEW_TYPE_TAG(OnePNIConductionBoxProblem, INHERITS_FROM(BoxModel, OnePNIConductionProblem));
NEW_TYPE_TAG(OnePNIConductionCCProblem, INHERITS_FROM(CCModel, OnePNIConductionProblem));