Commit 3a43fb8d authored by Katharina Heck's avatar Katharina Heck

[mm][co2] cleanup

change model back to nonisothermal model and adapt boundary conditions.
parent a4377bb3
......@@ -7,7 +7,7 @@ dune_add_test(NAME co2plumeshapeexercise
CMD_ARGS --script fuzzy
--files ${CMAKE_SOURCE_DIR}/lecture/references/co2plumeshape-reference.vtu
${CMAKE_CURRENT_BINARY_DIR}/co2plumeshape-00002.vtu
--command "${CMAKE_CURRENT_BINARY_DIR}/co2plumeshapeexercise -TimeLoop.TEnd 1e7 -TimeLoop.EpisodeLength 1e7 -BoundaryConditions.InjectionRate 0.01")
--command "${CMAKE_CURRENT_BINARY_DIR}/co2plumeshapeexercise -TimeLoop.TEnd 1e7 -TimeLoop.EpisodeLength 1e7 -BoundaryConditions.InjectionRate 0.01")
#install sources
install(FILES
......
......@@ -39,6 +39,7 @@ Pressure = 1.5e7 # [Pa] initial pressure
InjectionRate = 0.001 # [kg/s] mass injection of CO2
InjectionTemperature = 313.15 # [K] temperature of injected CO2
[Newton]
MaxRelativeShift = 1e-8
SatisfyResidualAndShiftCriterion = true
[Component]
SolidDensity = 2700
SolidThermalConductivity = 2.8
SolidHeatCapacity = 790
......@@ -42,7 +42,7 @@
// per default use isothermal model
#ifndef ISOTHERMAL
#define ISOTHERMAL 1
#define ISOTHERMAL 0
#endif
namespace Dumux {
......@@ -56,7 +56,7 @@ class PlumeShapeProblem;
namespace Properties {
// Create new type tags
namespace TTag {
struct PlumeShapeTypeTag { using InheritsFrom = std::tuple<TwoPTwoCCO2>; };
struct PlumeShapeTypeTag { using InheritsFrom = std::tuple<TwoPTwoCCO2NI>; };
struct PlumeShapeBoxTypeTag { using InheritsFrom = std::tuple<BoxModel, PlumeShapeTypeTag>; };
} // end namespace TTag
......@@ -87,7 +87,7 @@ public:
using type = FluidSystems::BrineCO2<Scalar,
CO2TablesBenchmarkThree::CO2Tables,
Components::TabulatedComponent<Components::H2O<Scalar>>,
FluidSystems::BrineCO2DefaultPolicy</*constantSalinity=*/true, /*simpleButFast=*/true>>;
FluidSystems::BrineCO2DefaultPolicy</*constantSalinity=*/true, /*simpleButFast=*/false>>;
};
// Use Moles
......@@ -140,9 +140,6 @@ class PlumeShapeProblem : public PorousMediumFlowProblem<TypeTag>
pressureIdx = Indices::pressureIdx,
switchIdx = Indices::switchIdx,
wPhaseIdx = Indices::pressureIdx,
nPhaseIdx = Indices::switchIdx,
// phase presence index
firstPhaseOnly = Indices::firstPhaseOnly,
......@@ -211,11 +208,6 @@ public:
gravity_[1] = -9.81 * cos(dipAngleRadians_);
gravity_[0] = -9.81 * sin(dipAngleRadians_);
#if !ISOTHERMAL
injectionPressure_ = getParam<Scalar>("Problem.InjectionPressure");
injectionTemperature_ = getParam<Scalar>("Problem.InjectionTemperature");
#endif
// initialize the tables of the fluid system
FluidSystem::init(/*Tmin=*/temperatureLow_,
......@@ -317,19 +309,19 @@ public:
* E.g. for the mass balance that would the mass flux in \f$ [ kg / (m^2 \cdot s)] \f$.
*/
NumEqVector neumann(const Element& element,
const FVElementGeometry& fvGeometry,
const ElementVolumeVariables& elemVolvars,
const SubControlVolumeFace& scvf) const
const FVElementGeometry& fvGeometry,
const ElementVolumeVariables& elemVolvars,
const SubControlVolumeFace& scvf) const
{
NumEqVector fluxes(0.0);
// kg/(m^2*s) or mole/(m^2*s) depending on useMoles
auto globalPos = scvf.ipGlobal();
const auto globalPos = scvf.ipGlobal();
if ( globalPos[1] < 30.0 + eps_ && globalPos[0] < eps_ )
{
Scalar massFlux = injectionRate_ /30.0; // [kg/(s*m^2)]
fluxes[contiCO2EqIdx] = -massFlux; // kg/(s*m^2)
#if !ISOTHERMAL
const Scalar pressure = elemVolvars[scvf.insideScvIdx()].pressure(nPhaseIdx);
const Scalar pressure = elemVolvars[scvf.insideScvIdx()].pressure(FluidSystem::phase1Idx);
fluxes[energyEqIdx] = -massFlux*CO2::gasEnthalpy(injectionTemperature_, pressure);
#endif
}
......@@ -393,20 +385,24 @@ private:
values[Indices::switchIdx] = massFracLiquidCO2;
#if !ISOTHERMAL
values[temperatureIdx] = temperature_;//290.0 + (depthBOR_ - globalPos[1])*0.03;
#endif
return values;
}
Scalar injectionRate_;
#if !ISOTHERMAL
Scalar injectionPressure_, injectionTemperature_;
Scalar injectionTemperature_;
#endif
int nTemperature_;
int nPressure_;
Scalar temperature_;
Scalar injectionTemperature_;
Scalar pressure_;
Scalar dipAngleRadians_, dipAngle_;
......
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