Skip to content
Snippets Groups Projects
Commit 576cc37e authored by Kilian Weishaupt's avatar Kilian Weishaupt Committed by Timo Koch
Browse files

[2p1cni] Various clean-ups

parent b8e9332a
No related branches found
No related tags found
2 merge requests!617[WIP] Next,!522[2p1c] Port 2p1cni model to next
......@@ -168,13 +168,13 @@ SET_BOOL_PROP(TwoPOneCNI, EnableMolecularDiffusion, false); //!
SET_TYPE_PROP(TwoPOneCNI, PrimaryVariables, SwitchablePrimaryVariables<TypeTag, int>);
//! Somerton is used as default model to compute the effective thermal heat conductivity
SET_PROP(NonIsothermal, ThermalConductivityModel)
SET_PROP(TwoPOneCNI, ThermalConductivityModel)
{
private:
typedef typename GET_PROP_TYPE(TypeTag, Scalar) Scalar;
typedef typename GET_PROP_TYPE(TypeTag, Indices) Indices;
using Scalar = typename GET_PROP_TYPE(TypeTag, Scalar);
using Indices = typename GET_PROP_TYPE(TypeTag, Indices);
public:
typedef ThermalConductivitySomerton<Scalar> type;
using type = ThermalConductivitySomerton<Scalar>;
};
//////////////////////////////////////////////////////////////////
......
......@@ -3,7 +3,7 @@ add_input_file_links()
dune_add_test(NAME test_2p1cni_box
SOURCES test_2p1c_fv.cc
COMPILE_DEFINITIONS TYPETAG=TwoPOneCNIBoxProblem
COMPILE_DEFINITIONS TYPETAG=TwoPOneCNIBoxTypeTag
COMMAND ${CMAKE_SOURCE_DIR}/bin/testing/runtest.py
CMD_ARGS --script fuzzy
--files ${CMAKE_SOURCE_DIR}/test/references/1p2cniccmpfaconvection-reference.vtu
......@@ -12,9 +12,9 @@ dune_add_test(NAME test_2p1cni_box
dune_add_test(NAME test_2p1cni_tpfa
SOURCES test_2p1c_fv.cc
COMPILE_DEFINITIONS TYPETAG=TwoPOneCNICCTpfaProblem
COMPILE_DEFINITIONS TYPETAG=TwoPOneCNICCTpfaTypeTag
COMMAND ${CMAKE_SOURCE_DIR}/bin/testing/runtest.py
CMD_ARGS --script fuzzy
--files ${CMAKE_SOURCE_DIR}/test/references/1p2cniccmpfaconvection-reference.vtu
${CMAKE_CURRENT_BINARY_DIR}/1p2cni_convectiontest_mpfa-00010.vtu
--files ${CMAKE_SOURCE_DIR}/test/references/steaminjectioncc-reference.vtu
${CMAKE_CURRENT_BINARY_DIR}/test_ccsteaminjection-00009.vtu
--command "${CMAKE_CURRENT_BINARY_DIR}/test_2p1cni_tpfa test_ccsteaminjection.input")
......@@ -44,18 +44,18 @@ class InjectionProblem;
namespace Properties
{
NEW_TYPE_TAG(InjectionProblem, INHERITS_FROM(TwoPOneCNI, InjectionProblemSpatialParams));
NEW_TYPE_TAG(TwoPOneCNIBoxProblem, INHERITS_FROM(BoxModel, InjectionProblem));
NEW_TYPE_TAG(TwoPOneCNICCTpfaProblem, INHERITS_FROM(CCTpfaModel, InjectionProblem));
NEW_TYPE_TAG(InjectionProblemTypeTag, INHERITS_FROM(TwoPOneCNI, InjectionProblemSpatialParams));
NEW_TYPE_TAG(TwoPOneCNIBoxTypeTag, INHERITS_FROM(BoxModel, InjectionProblemTypeTag));
NEW_TYPE_TAG(TwoPOneCNICCTpfaTypeTag, INHERITS_FROM(CCTpfaModel, InjectionProblemTypeTag));
SET_TYPE_PROP(InjectionProblem, Grid, Dune::YaspGrid<2>);
SET_TYPE_PROP(InjectionProblemTypeTag, Grid, Dune::YaspGrid<2>);
// Set the problem property
SET_TYPE_PROP(InjectionProblem, Problem, InjectionProblem<TypeTag>);
SET_TYPE_PROP(InjectionProblemTypeTag, Problem, InjectionProblem<TypeTag>);
// Set fluid configuration
SET_PROP(InjectionProblem, FluidSystem)
SET_PROP(InjectionProblemTypeTag, FluidSystem)
{
private:
using Scalar = typename GET_PROP_TYPE(TypeTag, Scalar);
......@@ -66,16 +66,14 @@ public:
//Define whether spurious cold-water flow into the steam is blocked
SET_BOOL_PROP(InjectionProblem, UseBlockingOfSpuriousFlow, true);
SET_BOOL_PROP(InjectionProblemTypeTag, UseBlockingOfSpuriousFlow, true);
}
//TODO: Names
/*!
* \ingroup ThreePTwoCNIBoxModel
* \ingroup ImplicitTestProblems
* \ingroup TwoPOneC
* \brief Non-isothermal 2D problem where steam is injected on the lower left side of the domain.
*
* This problem uses the \ref ThreePTwoCNIModel.
* This problem uses the \ref TwoPOneC model.
*
* */
template <class TypeTag>
......@@ -96,9 +94,6 @@ class InjectionProblem : public PorousMediumFlowProblem<TypeTag>
using GridView = typename GET_PROP_TYPE(TypeTag, GridView);
using Element = typename GridView::template Codim<0>::Entity;
using FVGridGeometry = typename GET_PROP_TYPE(TypeTag, FVGridGeometry);
using SolutionVector = typename GET_PROP_TYPE(TypeTag, SolutionVector);
using VolumeVariables = typename GET_PROP_TYPE(TypeTag, VolumeVariables);
using ElementSolutionVector = typename GET_PROP_TYPE(TypeTag, ElementSolutionVector);
using ResidualVector = typename GET_PROP_TYPE(TypeTag, NumEqVector);
// copy some indices for convenience
......@@ -120,20 +115,14 @@ class InjectionProblem : public PorousMediumFlowProblem<TypeTag>
static constexpr int dim = GridView::dimension;
static constexpr int dimWorld = GridView::dimensionworld;
static constexpr bool isBox = GET_PROP_VALUE(TypeTag, DiscretizationMethod) == DiscretizationMethods::Box;
using GlobalPosition = Dune::FieldVector<Scalar, dimWorld>;
enum { dofCodim = isBox ? dim : 0 };
public:
/*!
* \brief The constructor
*
* \param timeManager The time manager
* \param gridView The grid view
*/
InjectionProblem(std::shared_ptr<const FVGridGeometry> fvGridGeometry)
: ParentType(fvGridGeometry)
{
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment