From e0fa1399804060eea426cfa0e2821c18f12a12f8 Mon Sep 17 00:00:00 2001 From: Bernd Flemisch <bernd@iws.uni-stuttgart.de> Date: Thu, 9 Feb 2012 13:42:43 +0000 Subject: [PATCH] CMake: adapt to changed 1p2c test git-svn-id: svn://svn.iws.uni-stuttgart.de/DUMUX/dumux/trunk@7689 2fb0f335-1f38-0410-981e-8018bf24f1b0 --- .../1p2c/interstitialfluidtrailfluidsystem.hh | 393 ------------------ 1 file changed, 393 deletions(-) delete mode 100644 test/boxmodels/1p2c/interstitialfluidtrailfluidsystem.hh diff --git a/test/boxmodels/1p2c/interstitialfluidtrailfluidsystem.hh b/test/boxmodels/1p2c/interstitialfluidtrailfluidsystem.hh deleted file mode 100644 index 661996c909..0000000000 --- a/test/boxmodels/1p2c/interstitialfluidtrailfluidsystem.hh +++ /dev/null @@ -1,393 +0,0 @@ -// -*- mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- -// vi: set et ts=4 sw=4 sts=4: -/***************************************************************************** - * Copyright (C) 2011 by Andreas Lauser * - * Copyright (C) 2010 by Bernd Flemisch * - * Institute for Modelling Hydraulic and Environmental Systems * - * University of Stuttgart, Germany * - * email: <givenname>.<name>@iws.uni-stuttgart.de * - * * - * This program is free software: you can redistribute it and/or modify * - * it under the terms of the GNU General Public License as published by * - * the Free Software Foundation, either version 2 of the License, or * - * (at your option) any later version. * - * * - * This program is distributed in the hope that it will be useful, * - * but WITHOUT ANY WARRANTY; without even the implied warranty of * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * - * GNU General Public License for more details. * - * * - * You should have received a copy of the GNU General Public License * - * along with this program. If not, see <http://www.gnu.org/licenses/>. * - *****************************************************************************/ -/*! - * \file - * - * \brief A fluid system with one phase and two components - * (interstitial fluid and TRAIL, a therapeutic agent for - * cancer therapy). - */ -#ifndef DUMUX_INTERSTITIAL_FLUID_TRAIL_FLUID_SYSTEM_HH -#define DUMUX_INTERSTITIAL_FLUID_TRAIL_FLUID_SYSTEM_HH - -#include <dune/common/exceptions.hh> - -#include <dumux/material/fluidsystems/basefluidsystem.hh> - -#include <assert.h> - -#ifdef DUMUX_PROPERTIES_HH -#include <dumux/common/basicproperties.hh> -#endif - -namespace Dumux -{ -namespace FluidSystems -{ - -/*! - * \ingroup Fluidsystems - * - * \brief A fluid system with one phase and two components - * (interstitial fluid and TRAIL, a therapeutic agent for - * cancer therapy). - * - * A fluid system with one phase and two components representing an - * interstitial fluid that contains therapeutic agent (TRAIL). This is - * used in conjunction the 1p2c model. - */ -template <class Scalar> -class InterstitialFluidTrail -: public BaseFluidSystem<Scalar, InterstitialFluidTrail<Scalar> > -{ - typedef InterstitialFluidTrail<Scalar> ThisType; - typedef BaseFluidSystem<Scalar, ThisType> Base; - -public: - /**************************************** - * Fluid phase related static parameters - ****************************************/ - - //! Number of phases in the fluid system - static constexpr int numPhases = 1; - - //! Index of the liquid phase - static constexpr int lPhaseIdx = 1; - - /*! - * \brief Return the human readable name of a fluid phase - * - * \param phaseIdx The index of the fluid phase to consider - */ - static const char *phaseName(int phaseIdx) - { - static const char *name[] = { - "l" - }; - - assert(0 <= phaseIdx && phaseIdx < numPhases); - return name[phaseIdx]; - } - - /*! - * \brief Return whether a phase is liquid - * - * \param phaseIdx The index of the fluid phase to consider - */ - static bool isLiquid(int phaseIdx) - { - assert(0 <= phaseIdx && phaseIdx < numPhases); - return true; - } - - /*! - * \brief Returns true if and only if a fluid phase is assumed to - * be an ideal mixture. - * - * We define an ideal mixture as a fluid phase where the fugacity - * coefficients of all components times the pressure of the phase - * are indepent on the fluid composition. This assumtion is true - * if Henry's law and Rault's law apply. If you are unsure what - * this function should return, it is safe to return false. The - * only damage done will be (slightly) increased computation times - * in some cases. - * - * \param phaseIdx The index of the fluid phase to consider - */ - static bool isIdealMixture(int phaseIdx) - { - assert(0 <= phaseIdx && phaseIdx < numPhases); - // we assume Henry's and Rault's laws for the water phase and - // and no interaction between gas molecules of different - // components, so all phases are ideal mixtures! - return true; - } - - /*! - * \brief Returns true if and only if a fluid phase is assumed to - * be compressible. - * - * Compressible means that the partial derivative of the density - * to the fluid pressure is always larger than zero. - * - * \param phaseIdx The index of the fluid phase to consider - */ - static bool isCompressible(int phaseIdx) - { - assert(0 <= phaseIdx && phaseIdx < numPhases); - return false; - } - - /*! - * \brief Returns true if and only if a fluid phase is assumed to - * be an ideal gas. - */ - static bool isIdealGas(int phaseIdx) - { - assert(0 <= phaseIdx && phaseIdx < numPhases); - return false; // we assume a incompressible liquid - } - - /**************************************** - * Component related static parameters - ****************************************/ - - //! Number of components in the fluid system - static constexpr int numComponents = 2; - - //! Index of component representing the interstitial fluid - static constexpr int IsFluidIdx = 0; - //! Index of component representing TRAIL - static constexpr int TrailIdx = 1; - - /*! - * \brief Return the human readable name of a component - * - * \param compIdx The index of the component to consider - */ - static const char *componentName(int compIdx) - { - static const char *name[] = { - "ISFluid", - "Trail" - }; - - assert(0 <= compIdx && compIdx < numComponents); - return name[compIdx]; - } - - /*! - * \brief Return the molar mass of a component in [kg/mol]. - * - * \param compIdx The index of the component to consider - */ - static Scalar molarMass(int compIdx) - { - static const Scalar M[] = { - 22e-3, // [kg/mol], TODO: this is just a rough guess - 567e-3, // [kg/mol] - }; - - assert(0 <= compIdx && compIdx < numComponents); - return M[compIdx]; - } - - /**************************************** - * thermodynamic relations - ****************************************/ - - /*! - * \brief Initialize the fluid system's static parameters generically - * - * If a tabulated H2O component is used, we do our best to create - * tables that always work. - */ - static void init() - {} - - /*! - * \brief Return the phase density [kg/m^3]. - * - * \param fluidState An abitrary fluid state - * \param phaseIdx The index of the fluid phase to consider - */ - using Base::density; - template <class FluidState> - static Scalar density(const FluidState &fluidState, - int phaseIdx) - { - assert(0 <= phaseIdx && phaseIdx < numPhases); - - return 1.03e3; // in [kg /m^3] - } - - /*! - * \brief Calculate the fugacity coefficient [Pa] of an individual - * component in a fluid phase - * - * The fugacity coefficient \f$\phi_\kappa\f$ is connected to the - * fugacity \f$f_\kappa\f$ and the component's molarity - * \f$x_\kappa\f$ by means of the relation - * - * \f[ f_\kappa = \phi_\kappa * x_{\kappa} \f] - * - * \param fluidState An abitrary fluid state - * \param phaseIdx The index of the fluid phase to consider - * \param compIdx The index of the component to consider - */ - using Base::fugacityCoefficient; - template <class FluidState> - static Scalar fugacityCoefficient(const FluidState &fluidState, - int phaseIdx, - int compIdx) - { - assert(0 <= phaseIdx && phaseIdx < numPhases); - assert(0 <= compIdx && compIdx < numComponents); - return 1.0; - } - - /*! - * \brief Return the dynamic viscosity of a phase [Pa s]. - * - * \param fluidState An abitrary fluid state - * \param phaseIdx The index of the fluid phase to consider - */ - using Base::viscosity; - template <class FluidState> - static Scalar viscosity(const FluidState &fluidState, - int phaseIdx) - { - assert(0 <= phaseIdx && phaseIdx < numPhases); - - return 0.00069152; // [Pa*s] - } - - /*! - * \brief Calculate the molecular diffusion coefficient for a - * component in a fluid phase [mol^2 * s / (kg*m^3)] - * - * Molecular diffusion of a compoent \f$\kappa\f$ is caused by a - * gradient of the chemical potential and follows the law - * - * \f[ J = - D \mathbf{grad} mu_\kappa \f] - * - * where \f$\mu_\kappa\f$ is the component's chemical potential, - * \f$D\f$ is the diffusion coefficient and \f$J\f$ is the - * diffusive flux. \f$mu_\kappa\f$ is connected to the component's - * fugacity \f$f_\kappa\f$ by the relation - * - * \f[ \mu_\kappa = R T_\alpha \mathrm{ln} \frac{f_\kappa}{p_\alpha} \f] - * - * where \f$p_\alpha\f$ and \f$T_\alpha\f$ are the fluid phase' - * pressure and temperature. - * - * \param fluidState An abitrary fluid state - * \param phaseIdx The index of the fluid phase to consider - * \param compIdx The index of the component to consider - */ - using Base::diffusionCoefficient; - template <class FluidState> - static Scalar diffusionCoefficient(const FluidState &fluidState, - int phaseIdx, - int compIdx) - { - // TODO! - DUNE_THROW(Dune::NotImplemented, "Diffusion coefficients"); - } - - - /*! - * \brief Given a phase's composition, temperature and pressure, - * return the binary diffusion coefficient for components - * \f$i\f$ and \f$j\f$ in this phase. - * - * \param fluidState An abitrary fluid state - * \param phaseIdx The index of the fluid phase to consider - * \param compIIdx The index of the first component to consider - * \param compJIdx The index of the second component to consider - */ - using Base::binaryDiffusionCoefficient; - template <class FluidState> - static Scalar binaryDiffusionCoefficient(const FluidState &fluidState, - int phaseIdx, - int compIIdx, - int compJIdx) - - { - assert(0 <= phaseIdx && phaseIdx < numPhases); - assert(0 <= compIIdx && compIIdx < numComponents); - assert(0 <= compJIdx && compJIdx < numComponents); - - // 3.7378e-12 - return 8.8786695e-14; // in [m^2/s] - } - - /*! - * \brief Given a phase's composition, temperature, pressure and - * density, calculate its specific enthalpy [J/kg]. - * - * \param fluidState An abitrary fluid state - * \param phaseIdx for which phase to give back the heat capacity - */ - using Base::enthalpy; - template <class FluidState> - static Scalar enthalpy(const FluidState &fluidState, - int phaseIdx) - { - assert(0 <= phaseIdx && phaseIdx < numPhases); - - DUNE_THROW(Dune::NotImplemented, "Enthalpies"); - } - - /*! - * \brief Thermal conductivity of a fluid phase [W/(m^2 K/m)]. - * - * \param fluidState An abitrary fluid state - * \param phaseIdx for which phase to give back the heat capacity - */ - using Base::thermalConductivity; - template <class FluidState> - static Scalar thermalConductivity(const FluidState &fluidState, - int phaseIdx) - { - assert(0 <= phaseIdx && phaseIdx < numPhases); - - DUNE_THROW(Dune::NotImplemented, "Thermal conductivities."); - } - - /*! - * \brief Specific isobaric heat capacity of a fluid phase. - * \f$\mathrm{[J/kg]}\f$. - * - * \param fluidState An abitrary fluid state - * \param phaseIdx The index of the fluid phase to consider - */ - using Base::heatCapacity; - template <class FluidState> - static Scalar heatCapacity(const FluidState &fluidState, - int phaseIdx) - { - assert(0 <= phaseIdx && phaseIdx < numPhases); - - DUNE_THROW(Dune::NotImplemented, "Heat capacities."); - } -}; - -} // end namepace - -#ifdef DUMUX_PROPERTIES_HH -/*! - * \brief A pure single-phase fluid system. - * - * This is an adapter to use Dumux::InterstitialFluidTrailFluidSystem<TypeTag>, as is - * done with most other classes in Dumux and all template parameters - * are usually defined in the property system anyhow. - */ -template<class TypeTag> -class InterstitialFluidTrailFluidSystem -: public FluidSystems::InterstitialFluidTrail<typename GET_PROP_TYPE(TypeTag, Scalar)> -{}; -#endif -} // end namepace - -#endif -- GitLab