Commit 3309c519 authored by Katharina Heck's avatar Katharina Heck
Browse files

example2: add different fluidsystems and introduce compile definitions

parent d8e101d3
add_input_file_links()
dune_add_test(NAME test_stokes1p2cdarcy2p2c_radiation_laminar
dune_add_test(NAME test_stokes1p2cdarcy2p2c_radiation_laminar_fixeddiffusion
SOURCES main.cc
CMAKE_GUARD HAVE_UMFPACK)
CMAKE_GUARD HAVE_UMFPACK
COMPILE_DEFINITIONS FLUIDSYSTEM=FluidSystems::H2OAirFixedDiffusion)
dune_add_test(NAME test_stokes1p2cdarcy2p2c_radiation_laminar_fixedviscosity
SOURCES main.cc
CMAKE_GUARD HAVE_UMFPACK
COMPILE_DEFINITIONS FLUIDSYSTEM=FluidSystems::H2OAirFixedViscosity)
dune_add_test(NAME test_stokes1p2cdarcy2p2c_radiation_laminar_fixeddensity
SOURCES main.cc
CMAKE_GUARD HAVE_UMFPACK
COMPILE_DEFINITIONS FLUIDSYSTEM=FluidSystems::H2OAirFixedDensity)
dune_add_test(NAME test_stokes1p2cdarcy2p2c_radiation_laminar_allvary
SOURCES main.cc
CMAKE_GUARD HAVE_UMFPACK
COMPILE_DEFINITIONS FLUIDSYSTEM=FluidSystems::H2OAir)
set(CMAKE_BUILD_TYPE Debug)
......@@ -36,6 +36,9 @@
#include "spatialparams.hh"
#include "radiation.hh"
#include "fluidsystem/h2oair_fixeddiffusion.hh"
#include "fluidsystem/h2oair_fixedviscosity.hh"
#include "fluidsystem/h2oair_fixeddensity.hh"
#include "fluidsystem/h2oair.hh"
namespace Dumux
{
......@@ -55,7 +58,7 @@ struct Problem<TypeTag, TTag::DarcyTwoPTwoCTypeTag> { using type = Dumux::DarcyS
// the fluid system
template<class TypeTag>
struct FluidSystem<TypeTag, TTag::DarcyTwoPTwoCTypeTag> { using type = FluidSystems::H2OAir<GetPropType<TypeTag, Properties::Scalar>>; };
struct FluidSystem<TypeTag, TTag::DarcyTwoPTwoCTypeTag> { using type = FLUIDSYSTEM<GetPropType<TypeTag, Properties::Scalar>>; };
//! Set the default formulation to pw-Sn: This can be over written in the problem.
template<class TypeTag>
......
This diff is collapsed.
This diff is collapsed.
......@@ -22,8 +22,8 @@
* \ingroup Fluidsystems
* \brief @copybrief Dumux::FluidSystems::H2OAir
*/
#ifndef DUMUX_H2O_AIR_SYSTEM_HH
#define DUMUX_H2O_AIR_SYSTEM_HH
#ifndef DUMUX_H2O_AIR_FIXED_DIFFUSION_SYSTEM_HH
#define DUMUX_H2O_AIR_FIXED_DIFFUSION_SYSTEM_HH
#include <cassert>
#include <iomanip>
......@@ -48,7 +48,7 @@ namespace FluidSystems {
* \brief Policy for the H2O-air fluid system
*/
template<bool fastButSimplifiedRelations = false>
struct H2OAirDefaultPolicy
struct H2OAirFixedDiffusionDefaultPolicy
{
static constexpr bool useH2ODensityAsLiquidMixtureDensity() { return fastButSimplifiedRelations; }
static constexpr bool useIdealGasDensity() { return fastButSimplifiedRelations; }
......@@ -68,12 +68,12 @@ struct H2OAirDefaultPolicy
*/
template <class Scalar,
class H2Otype = Components::TabulatedComponent<Components::H2O<Scalar> >,
class Policy = H2OAirDefaultPolicy<>,
class Policy = H2OAirFixedDiffusionDefaultPolicy<>,
bool useKelvinVaporPressure = false>
class H2OAir
: public Base<Scalar, H2OAir<Scalar, H2Otype, Policy> >
class H2OAirFixedDiffusion
: public Base<Scalar, H2OAirFixedDiffusion<Scalar, H2Otype, Policy> >
{
using ThisType = H2OAir<Scalar,H2Otype, Policy>;
using ThisType = H2OAirFixedDiffusion<Scalar,H2Otype, Policy>;
using Base = Dumux::FluidSystems::Base<Scalar, ThisType>;
using IdealGas = Dumux::IdealGas<Scalar>;
......@@ -464,7 +464,7 @@ public:
{
assert(0 <= phaseIdx && phaseIdx < numPhases);
Scalar T = 283.15; /*fluidState.temperature(phaseIdx);*/
Scalar T = fluidState.temperature(phaseIdx);
Scalar p = fluidState.pressure(phaseIdx);
if (phaseIdx == liquidPhaseIdx)
......@@ -596,7 +596,7 @@ public:
if (compIIdx > compJIdx)
swap(compIIdx, compJIdx);
Scalar T = fluidState.temperature(phaseIdx);
Scalar T = 283.15;
Scalar p = fluidState.pressure(phaseIdx);
// we are in the liquid phase
......
This diff is collapsed.
......@@ -27,7 +27,7 @@
#include <dune/grid/yaspgrid.hh>
#include <dumux/material/fluidsystems/1padapter.hh>
#include "h2oair_fixeddiffusion.hh"
#include "fluidsystem/h2oair_fixeddiffusion.hh"
#include <dumux/freeflow/navierstokes/problem.hh>
#include <dumux/discretization/staggered/freeflow/properties.hh>
......@@ -54,7 +54,7 @@ struct Grid<TypeTag, TTag::StokesOnePTwoCTypeTag> { using type = Dune::YaspGrid<
template<class TypeTag>
struct FluidSystem<TypeTag, TTag::StokesOnePTwoCTypeTag>
{
using H2OAir = FluidSystems::H2OAir<GetPropType<TypeTag, Properties::Scalar>>;
using H2OAir = FLUIDSYSTEM<GetPropType<TypeTag, Properties::Scalar>>;
static constexpr auto phaseIdx = H2OAir::gasPhaseIdx; // simulate the water phase
using type = FluidSystems::OnePAdapter<H2OAir, phaseIdx>;
};
......
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