Commit e1722384 authored by Kilian Weishaupt's avatar Kilian Weishaupt
Browse files

Merge branch 'fix/co2' into 'master'

[co2plumeshape] Use soldependent Neumann BC

The enthalpy of the injected CO2 is now evaluated using the
actual pressure and temperature at the injection well.

Removed some unused code.

See merge request !3
parents fe73a45b 3c517c2c
......@@ -51,10 +51,6 @@ namespace Properties
// for the correct type tag, see 2p2cniproperties.hh
NEW_TYPE_TAG(PlumeShapeProblem, INHERITS_FROM(BoxTwoPTwoCNI, PlumeShapeSpatialParams));
//! the CO2 Model and VolumeVariables properties
//SET_TYPE_PROP(PlumeShapeProblem, Model, CO2Model<TypeTag>);
//SET_TYPE_PROP(PlumeShapeProblem, VolumeVariables, CO2VolumeVariables<TypeTag>);
SET_TYPE_PROP(PlumeShapeProblem, Grid, Dune::YaspGrid</*dim=*/2>); /*@\label{tutorial-coupled:set-grid}@*/
SET_TYPE_PROP(PlumeShapeProblem, GridCreator, Dumux::CubeGridCreator<TypeTag>); /*@\label{tutorial-coupled:set-gridcreator}@*/
......@@ -150,24 +146,6 @@ class PlumeShapeProblem : public ImplicitPorousMediaProblem<TypeTag>
temperatureIdx = Indices::temperatureIdx,
energyEqIdx = Indices::energyEqIdx,
#endif
// typedef typename GET_PROP_TYPE(TypeTag, MaterialLaw) MaterialLaw;
// typedef typename GET_PROP_TYPE(TypeTag, MaterialLawParams) MaterialLawParams;
// // copy some indices for convenience
// typedef typename GET_PROP_TYPE(TypeTag, Indices) Indices;
// enum {
// pressureIdx = Indices::pressureIdx,
// switch1Idx = Indices::switch1Idx,
// switch2Idx = Indices::switch2Idx,
//
// // Phase State
// wgPhaseOnly = Indices::wgPhaseOnly,
//
// // Grid and world dimension
// dim = GridView::dimension,
// dimWorld = GridView::dimensionworld
};
typedef typename GET_PROP_TYPE(TypeTag, PrimaryVariables) PrimaryVariables;
......@@ -180,6 +158,7 @@ class PlumeShapeProblem : public ImplicitPorousMediaProblem<TypeTag>
typedef typename GET_PROP_TYPE(TypeTag, FVElementGeometry) FVElementGeometry;
typedef typename GET_PROP_TYPE(TypeTag, GridCreator) GridCreator;
typedef typename GET_PROP_TYPE(TypeTag, ElementVolumeVariables) ElementVolumeVariables;
typedef Dune::FieldVector<Scalar, dimWorld> GlobalPosition;
typedef Dune::FieldVector<Scalar, dim> DimVector;
......@@ -340,9 +319,6 @@ public:
values.setDirichlet(temperatureIdx, energyEqIdx);
#endif
}
// #if !ISOTHERMAL
// values.setDirichlet(temperatureIdx, energyEqIdx);
// #endif
}
/*!
......@@ -381,26 +357,30 @@ public:
* For this method, the \a values parameter stores the mass flux
* in normal direction of each phase. Negative values mean influx.
*/
void neumann(PrimaryVariables &values,
const Element &element,
const FVElementGeometry &fvElemGeom,
const Intersection &is,
int scvIdx,
int boundaryFaceIdx) const
{
const GlobalPosition &globalPos = element.geometry().corner(scvIdx);
values = 0;
void solDependentNeumann(PrimaryVariables &values,
const Element &element,
const FVElementGeometry &fvGeometry,
const Intersection &intersection,
const int scvIdx,
const int boundaryFaceIdx,
const ElementVolumeVariables &elemVolVars) const
{
const GlobalPosition &globalPos = element.geometry().corner(scvIdx);
const Scalar temperature = elemVolVars[scvIdx].temperature();
const Scalar pressure = elemVolVars[scvIdx].pressure(gPhaseIdx);
values = 0;
if ( globalPos[1] < 30. + eps_ && globalPos[0] < eps_ ) {
Scalar massFlux = massInj_ /( 30. ); // [kg/(s*m^2)]
// std::cout<<"values:\n"<<massFlux;
values[contiCO2EqIdx] = -massFlux; // kg/(s*m^2)
#if !ISOTHERMAL
values[energyEqIdx] = -massFlux*CO2::gasEnthalpy(temperature_, 5e6); // W/(m^2)
values[energyEqIdx] = -massFlux*CO2::gasEnthalpy(temperature, pressure); // W/(m^2)
#endif
}
}
/*!
* \brief Evaluate the initial value for a control volume.
*
......
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