Commit 356f815f authored by Bernd Flemisch's avatar Bernd Flemisch

adapt problems and spatial parameters to changes in master

parent 7ff2a2a1
......@@ -59,7 +59,7 @@ SET_TYPE_PROP(FuelCellLectureProblem, Grid, Dune::YaspGrid<2>);
SET_TYPE_PROP(FuelCellLectureProblem, Problem, FuelCellLectureProblem<TypeTag>);
// Set the primary variable combination for the 2pnc model
SET_INT_PROP(FuelCellLectureProblem, Formulation, TwoPNCFormulation::pgSl);
SET_INT_PROP(FuelCellLectureProblem, Formulation, TwoPNCFormulation::pnsw);
// Set fluid configuration
SET_PROP(FuelCellLectureProblem, FluidSystem)
......
......@@ -40,7 +40,7 @@ class SagdProblem;
namespace Properties
{
NEW_TYPE_TAG(SagdProblem, INHERITS_FROM(ThreePWaterOil, SagdSpatialParams));
NEW_TYPE_TAG(SagdProblem, INHERITS_FROM(ThreePWaterOilNI, SagdSpatialParams));
NEW_TYPE_TAG(SagdBoxProblem, INHERITS_FROM(BoxModel, SagdProblem));
NEW_TYPE_TAG(SagdCCProblem, INHERITS_FROM(CCModel, SagdProblem));
......
......@@ -212,64 +212,49 @@ public:
* \param scvIdx The local index of the sub-control volume where
* the heat capacity needs to be defined
*/
Scalar heatCapacity(const Element &element,
const FVElementGeometry &fvGeometry,
const int scvIdx) const
Scalar solidHeatCapacity(const Element &element,
const FVElementGeometry &fvGeometry,
const int scvIdx) const
{
const GlobalPosition &pos = fvGeometry.subContVol[scvIdx].global;
if (isFineMaterial_(pos))
return fineHeatCap_ * 2650 // density of sand [kg/m^3]
* (1 - porosity(element, fvGeometry, scvIdx));
return fineHeatCap_;
else
return coarseHeatCap_ * 2650 // density of sand [kg/m^3]
* (1 - porosity(element, fvGeometry, scvIdx));
return coarseHeatCap_;
}
/*!
* \brief Calculate the heat flux \f$[W/m^2]\f$ through the
* rock matrix based on the temperature gradient \f$[K / m]\f$
* \brief Returns the mass density \f$[kg / m^3]\f$ of the rock matrix.
*
* This is only required for non-isothermal models.
*
* \param heatFlux The resulting heat flux vector
* \param fluxDat The flux variables
* \param elemVolVars The volume variables
* \param tempGrad The temperature gradient
* \param element The current finite element
* \param fvGeometry The finite volume geometry of the current element
* \param faceIdx The local index of the sub-control volume face where
* the matrix heat flux should be calculated
* \param element The finite element
* \param fvGeometry The finite volume geometry
* \param scvIdx The local index of the sub-control volume
*/
void matrixHeatFlux(DimVector &heatFlux,
const FluxVariables &fluxDat,
const ElementVolumeVariables &elemVolVars,
const DimVector &tempGrad,
const Element &element,
Scalar solidDensity(const Element &element,
const FVElementGeometry &fvGeometry,
int faceIdx) const
const int scvIdx) const
{
static const Scalar ldry = 0.35;
static const Scalar lSw1 = 1.8;
static const Scalar lSn1 = 0.65;
// arithmetic mean of the liquid saturation and the porosity
const int i = fvGeometry.subContVolFace[faceIdx].i;
const int j = fvGeometry.subContVolFace[faceIdx].j;
const Scalar Sw = std::max(0.0, (elemVolVars[i].saturation(wPhaseIdx) +
elemVolVars[j].saturation(wPhaseIdx)) / 2);
const Scalar Sn = std::max(0.0, (elemVolVars[i].saturation(nPhaseIdx) +
elemVolVars[j].saturation(nPhaseIdx)) / 2);
// the heat conductivity of the matrix. in general this is a
// tensorial value, but we assume isotropic heat conductivity.
const Scalar heatCond = ldry + std::sqrt(Sw) * (lSw1-ldry) + std::sqrt(Sn) * (lSn1-ldry);
// the matrix heat flux is the negative temperature gradient
// times the heat conductivity.
heatFlux = tempGrad;
heatFlux *= -heatCond;
return 2650; // density of sand [kg/m^3]
}
/*!
* \brief Returns the thermal conductivity \f$\mathrm{[W/(m K)]}\f$ of the porous material.
*
* \param element The finite element
* \param fvGeometry The finite volume geometry
* \param scvIdx The local index of the sub-control volume where
* the heat capacity needs to be defined
*/
Scalar solidThermalConductivity(const Element &element,
const FVElementGeometry &fvGeometry,
const int scvIdx) const
{
return lambdaSolid_;
}
private:
bool isFineMaterial_(const GlobalPosition &pos) const
{
......
......@@ -41,7 +41,7 @@ class SagdCyclicProblem;
namespace Properties
{
NEW_TYPE_TAG(SagdCyclicProblem, INHERITS_FROM(ThreePWaterOil, SagdCyclicSpatialParams));
NEW_TYPE_TAG(SagdCyclicProblem, INHERITS_FROM(ThreePWaterOilNI, SagdCyclicSpatialParams));
NEW_TYPE_TAG(SagdCyclicBoxProblem, INHERITS_FROM(BoxModel, SagdCyclicProblem));
......
......@@ -231,63 +231,48 @@ public:
* \param scvIdx The local index of the sub-control volume where
* the heat capacity needs to be defined
*/
Scalar heatCapacity(const Element &element,
const FVElementGeometry &fvGeometry,
const int scvIdx) const
Scalar solidHeatCapacity(const Element &element,
const FVElementGeometry &fvGeometry,
const int scvIdx) const
{
const GlobalPosition &pos = fvGeometry.subContVol[scvIdx].global;
if (isFineMaterial_(pos))
return fineHeatCap_ * 2650 // density of sand [kg/m^3]
* (1 - porosity(element, fvGeometry, scvIdx));
return fineHeatCap_;
else
return coarseHeatCap_ * 2650 // density of sand [kg/m^3]
* (1 - porosity(element, fvGeometry, scvIdx));
return coarseHeatCap_;
}
/*!
* \brief Calculate the heat flux \f$[W/m^2]\f$ through the
* rock matrix based on the temperature gradient \f$[K / m]\f$
* \brief Returns the mass density \f$[kg / m^3]\f$ of the rock matrix.
*
* This is only required for non-isothermal models.
*
* \param heatFlux The resulting heat flux vector
* \param fluxDat The flux variables
* \param elemVolVars The volume variables
* \param tempGrad The temperature gradient
* \param element The current finite element
* \param fvGeometry The finite volume geometry of the current element
* \param faceIdx The local index of the sub-control volume face where
* the matrix heat flux should be calculated
* \param element The finite element
* \param fvGeometry The finite volume geometry
* \param scvIdx The local index of the sub-control volume
*/
void matrixHeatFlux(DimVector &heatFlux,
const FluxVariables &fluxDat,
const ElementVolumeVariables &elemVolVars,
const DimVector &tempGrad,
const Element &element,
Scalar solidDensity(const Element &element,
const FVElementGeometry &fvGeometry,
int faceIdx) const
const int scvIdx) const
{
static const Scalar ldry = 0.35;
static const Scalar lSw1 = 1.8;
static const Scalar lSn1 = 0.65;
// arithmetic mean of the liquid saturation and the porosity
const int i = fvGeometry.subContVolFace[faceIdx].i;
const int j = fvGeometry.subContVolFace[faceIdx].j;
const Scalar Sw = std::max(0.0, (elemVolVars[i].saturation(wPhaseIdx) +
elemVolVars[j].saturation(wPhaseIdx)) / 2);
const Scalar Sn = std::max(0.0, (elemVolVars[i].saturation(nPhaseIdx) +
elemVolVars[j].saturation(nPhaseIdx)) / 2);
// the heat conductivity of the matrix. in general this is a
// tensorial value, but we assume isotropic heat conductivity.
const Scalar heatCond = ldry + std::sqrt(Sw) * (lSw1-ldry) + std::sqrt(Sn) * (lSn1-ldry);
// the matrix heat flux is the negative temperature gradient
// times the heat conductivity.
heatFlux = tempGrad;
heatFlux *= -heatCond;
return 2650; // density of sand [kg/m^3]
}
/*!
* \brief Returns the thermal conductivity \f$\mathrm{[W/(m K)]}\f$ of the porous material.
*
* \param element The finite element
* \param fvGeometry The finite volume geometry
* \param scvIdx The local index of the sub-control volume where
* the heat capacity needs to be defined
*/
Scalar solidThermalConductivity(const Element &element,
const FVElementGeometry &fvGeometry,
const int scvIdx) const
{
return lambdaSolid_;
}
struct MaxSaturations
{
Scalar MaxSatW;
......
......@@ -42,7 +42,7 @@ class SagdCyclicHystProblem;
namespace Properties
{
NEW_TYPE_TAG(SagdCyclicHystProblem, INHERITS_FROM(ThreePWaterOil, SagdCyclicHystSpatialParams));
NEW_TYPE_TAG(SagdCyclicHystProblem, INHERITS_FROM(ThreePWaterOilNI, SagdCyclicHystSpatialParams));
NEW_TYPE_TAG(SagdCyclicHystBoxProblem, INHERITS_FROM(BoxModel, SagdCyclicHystProblem));
NEW_TYPE_TAG(SagdCyclicHystCCProblem, INHERITS_FROM(CCModel, SagdCyclicHystProblem));
......
......@@ -216,63 +216,48 @@ public:
* \param scvIdx The local index of the sub-control volume where
* the heat capacity needs to be defined
*/
Scalar heatCapacity(const Element &element,
const FVElementGeometry &fvGeometry,
const int scvIdx) const
Scalar solidHeatCapacity(const Element &element,
const FVElementGeometry &fvGeometry,
const int scvIdx) const
{
const GlobalPosition &pos = fvGeometry.subContVol[scvIdx].global;
if (isFineMaterial_(pos))
return fineHeatCap_ * 2650 // density of sand [kg/m^3]
* (1 - porosity(element, fvGeometry, scvIdx));
return fineHeatCap_;
else
return coarseHeatCap_ * 2650 // density of sand [kg/m^3]
* (1 - porosity(element, fvGeometry, scvIdx));
return coarseHeatCap_;
}
/*!
* \brief Calculate the heat flux \f$[W/m^2]\f$ through the
* rock matrix based on the temperature gradient \f$[K / m]\f$
* \brief Returns the mass density \f$[kg / m^3]\f$ of the rock matrix.
*
* This is only required for non-isothermal models.
*
* \param heatFlux The resulting heat flux vector
* \param fluxDat The flux variables
* \param elemVolVars The volume variables
* \param tempGrad The temperature gradient
* \param element The current finite element
* \param fvGeometry The finite volume geometry of the current element
* \param faceIdx The local index of the sub-control volume face where
* the matrix heat flux should be calculated
* \param element The finite element
* \param fvGeometry The finite volume geometry
* \param scvIdx The local index of the sub-control volume
*/
void matrixHeatFlux(DimVector &heatFlux,
const FluxVariables &fluxDat,
const ElementVolumeVariables &elemVolVars,
const DimVector &tempGrad,
const Element &element,
Scalar solidDensity(const Element &element,
const FVElementGeometry &fvGeometry,
int faceIdx) const
const int scvIdx) const
{
static const Scalar ldry = 0.35;
static const Scalar lSw1 = 1.8;
static const Scalar lSn1 = 0.65;
// arithmetic mean of the liquid saturation and the porosity
const int i = fvGeometry.subContVolFace[faceIdx].i;
const int j = fvGeometry.subContVolFace[faceIdx].j;
const Scalar Sw = std::max(0.0, (elemVolVars[i].saturation(wPhaseIdx) +
elemVolVars[j].saturation(wPhaseIdx)) / 2);
const Scalar Sn = std::max(0.0, (elemVolVars[i].saturation(nPhaseIdx) +
elemVolVars[j].saturation(nPhaseIdx)) / 2);
// the heat conductivity of the matrix. in general this is a
// tensorial value, but we assume isotropic heat conductivity.
const Scalar heatCond = ldry + std::sqrt(Sw) * (lSw1-ldry) + std::sqrt(Sn) * (lSn1-ldry);
// the matrix heat flux is the negative temperature gradient
// times the heat conductivity.
heatFlux = tempGrad;
heatFlux *= -heatCond;
return 2650; // density of sand [kg/m^3]
}
/*!
* \brief Returns the thermal conductivity \f$\mathrm{[W/(m K)]}\f$ of the porous material.
*
* \param element The finite element
* \param fvGeometry The finite volume geometry
* \param scvIdx The local index of the sub-control volume where
* the heat capacity needs to be defined
*/
Scalar solidThermalConductivity(const Element &element,
const FVElementGeometry &fvGeometry,
const int scvIdx) const
{
return lambdaSolid_;
}
struct MaxSaturations
{
Scalar MaxSatW;
......
Markdown is supported
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