From 1e0d90ba2a01c5eef665a5e302af02145f4550ab Mon Sep 17 00:00:00 2001 From: Philipp Nuske <philipp.nuske@mailbox.org> Date: Tue, 17 Dec 2013 14:38:25 +0000 Subject: [PATCH] basically renaming: - soil -> solid - remove unused functions in obstaclespatialparameters git-svn-id: svn://svn.iws.uni-stuttgart.de/DUMUX/dumux/trunk@12237 2fb0f335-1f38-0410-981e-8018bf24f1b0 --- .../implicit/mpnc/diffusion/fluxvariables.hh | 2 - .../mpnc/energy/mpnclocalresidualenergy.hh | 2 +- .../energy/mpnclocalresidualenergykinetic.hh | 9 +-- .../mpnc/energy/mpncvolumevariablesenergy.hh | 16 ++-- .../mpncvolumevariablesenergykinetic.hh | 42 +++++----- dumux/implicit/mpnc/mpncproperties.hh | 4 +- dumux/implicit/mpnc/mpncpropertieskinetic.hh | 12 +-- .../evaporationatmospherespatialparams.hh | 14 ++-- test/implicit/mpnc/obstaclespatialparams.hh | 76 ------------------- 9 files changed, 49 insertions(+), 128 deletions(-) diff --git a/dumux/implicit/mpnc/diffusion/fluxvariables.hh b/dumux/implicit/mpnc/diffusion/fluxvariables.hh index 263a7b29f9..fbfa697961 100644 --- a/dumux/implicit/mpnc/diffusion/fluxvariables.hh +++ b/dumux/implicit/mpnc/diffusion/fluxvariables.hh @@ -138,8 +138,6 @@ public: // times porosity times phase saturation at the nodes i // and j // - // TODO (?): move this calculation to the soil (possibly - // that's a bad idea, though) Scalar red_i = elemVolVars[i].fluidState().saturation(phaseIdx)/elemVolVars[i].porosity() * pow(elemVolVars[i].porosity() * elemVolVars[i].fluidState().saturation(phaseIdx), 7.0/3); diff --git a/dumux/implicit/mpnc/energy/mpnclocalresidualenergy.hh b/dumux/implicit/mpnc/energy/mpnclocalresidualenergy.hh index 5e00e0bcb6..e1bec1099b 100644 --- a/dumux/implicit/mpnc/energy/mpnclocalresidualenergy.hh +++ b/dumux/implicit/mpnc/energy/mpnclocalresidualenergy.hh @@ -162,7 +162,7 @@ public: // heat stored in the rock matrix storage[energyEqIdx] += volVars.fluidState().temperature(/*phaseIdx=*/0) - * volVars.soilDensity() + * volVars.densitySolid() * (1.0 - volVars.porosity()) * volVars.heatCapacity(); } diff --git a/dumux/implicit/mpnc/energy/mpnclocalresidualenergykinetic.hh b/dumux/implicit/mpnc/energy/mpnclocalresidualenergykinetic.hh index 2d75486fd1..3b33683b14 100644 --- a/dumux/implicit/mpnc/energy/mpnclocalresidualenergykinetic.hh +++ b/dumux/implicit/mpnc/energy/mpnclocalresidualenergykinetic.hh @@ -113,7 +113,7 @@ public: else if(phaseIdx == sPhaseIdx) { // heat stored in the rock matrix storage[energyEq0Idx+phaseIdx] += volVars.temperature(phaseIdx) * - volVars.soilDensity() * + volVars.densitySolid() * (1.-volVars.porosity()) * volVars.heatCapacity(); } @@ -199,7 +199,6 @@ public: * CAUTION: this is not exactly correct: does diffusion carry the upstream phase enthalpy? To be more precise this should be the components enthalpy. In the same vein: Counter current diffusion is not accounted for here. */ const Scalar enthalpy = up.fluidState().enthalpy(phaseIdx) ; - flux[energyEq0Idx + phaseIdx] += enthalpy * massFlux ; } /*! @@ -309,9 +308,9 @@ public: const Scalar nonWettingToSolidEnergyExchange = factorEnergyTransfer * (Tn - Ts) / characteristicLength * ans * lambdaNS * nusseltNS ; //#warning HEAT TRANSFER OFF -// const Scalar WettingToNonWettingEnergyExchange = 0. ; -// const Scalar WettingToSolidEnergyExchange = 0. ; -// const Scalar NonWettingToSolidEnergyExchange = 0. ; +// const Scalar wettingToNonWettingEnergyExchange = 0. ; +// const Scalar wettingToSolidEnergyExchange = 0. ; +// const Scalar nonWettingToSolidEnergyExchange = 0. ; for(int phaseIdx =0; phaseIdx<numEnergyEqs; ++phaseIdx){ diff --git a/dumux/implicit/mpnc/energy/mpncvolumevariablesenergy.hh b/dumux/implicit/mpnc/energy/mpncvolumevariablesenergy.hh index 12c5e11866..aed4f0f646 100644 --- a/dumux/implicit/mpnc/energy/mpncvolumevariablesenergy.hh +++ b/dumux/implicit/mpnc/energy/mpncvolumevariablesenergy.hh @@ -194,9 +194,9 @@ public: problem.spatialParams().heatCapacity(element, fvGeometry, scvIdx); Valgrind::CheckDefined(heatCapacity_); - soilDensity_ = - problem.spatialParams().soilDensity(element, fvGeometry, scvIdx); - Valgrind::CheckDefined(soilDensity_); + densitySolid_ = + problem.spatialParams().densitySolid(element, fvGeometry, scvIdx); + Valgrind::CheckDefined(densitySolid_); // set the enthalpies for (int phaseIdx = 0; phaseIdx < numPhases; ++phaseIdx) { @@ -221,11 +221,11 @@ public: { return thermalConductivity_[phaseIdx] ; }; /*! - * \brief Returns the total density of the given soil [kg / m^3] in + * \brief Returns the total density of the given solid phase [kg / m^3] in * the sub-control volume. */ - Scalar soilDensity() const - { return soilDensity_; }; + Scalar densitySolid() const + { return densitySolid_; }; /*! * \brief If running under valgrind this produces an error message @@ -234,12 +234,12 @@ public: void checkDefined() const { Valgrind::CheckDefined(heatCapacity_); - Valgrind::CheckDefined(soilDensity_); + Valgrind::CheckDefined(densitySolid_); } protected: Scalar heatCapacity_; - Scalar soilDensity_; + Scalar densitySolid_; Scalar thermalConductivity_[numPhases] ; }; diff --git a/dumux/implicit/mpnc/energy/mpncvolumevariablesenergykinetic.hh b/dumux/implicit/mpnc/energy/mpncvolumevariablesenergykinetic.hh index 389634f788..afb05bfdd0 100644 --- a/dumux/implicit/mpnc/energy/mpncvolumevariablesenergykinetic.hh +++ b/dumux/implicit/mpnc/energy/mpncvolumevariablesenergykinetic.hh @@ -138,19 +138,19 @@ public: Valgrind::CheckDefined(heatCapacity_); for(int phaseIdx =0; phaseIdx<numPhases; ++phaseIdx){ - fluidThermalConductivity_[phaseIdx] = + thermalConductivityFluid_[phaseIdx] = FluidSystem::thermalConductivity(fluidState, paramCache, phaseIdx); } - Valgrind::CheckDefined(fluidThermalConductivity_); + Valgrind::CheckDefined(thermalConductivityFluid_); - soilDensity_ = - problem.spatialParams().soilDensity(element, fvGeometry, scvIdx); - Valgrind::CheckDefined(soilDensity_); + densitySolid_ = + problem.spatialParams().densitySolid(element, fvGeometry, scvIdx); + Valgrind::CheckDefined(densitySolid_); - soilThermalConductivity_ = + thermalConductivitySolid_ = problem.spatialParams().thermalConductivitySolid(element, fvGeometry, scvIdx); - Valgrind::CheckDefined(soilThermalConductivity_); + Valgrind::CheckDefined(thermalConductivitySolid_); // set the enthalpies for (int phaseIdx = 0; phaseIdx < numPhases; ++phaseIdx) { @@ -176,18 +176,18 @@ public: { return temperature_[phaseIdx]; } /*! - * \brief Returns the total density of the given soil [kg / m^3] in + * \brief Returns the total density of the given solid phase [kg / m^3] in * the sub-control volume. */ - Scalar soilDensity() const - { return soilDensity_; } + Scalar densitySolid() const + { return densitySolid_; } /*! - * \brief Returns the conductivity of the given soil [kg / m^3] in + * \brief Returns the conductivity of the given solid phase [kg / m^3] in * the sub-control volume. */ - Scalar soilThermalConductivity() const - { return soilThermalConductivity_; } + Scalar thermalConductivitySolid() const + { return thermalConductivitySolid_; } /*! * \brief Returns the conductivity of the given fluid [kg / m^3] in @@ -198,9 +198,9 @@ public: Scalar thermalConductivity(const unsigned int phaseIdx) const { if(phaseIdx == wPhaseIdx or phaseIdx == nPhaseIdx ) - return fluidThermalConductivity_[phaseIdx]; + return thermalConductivityFluid_[phaseIdx]; else if (phaseIdx == sPhaseIdx ) - return soilThermalConductivity_; + return thermalConductivitySolid_; else DUNE_THROW(Dune::NotImplemented, "wrong index"); @@ -216,18 +216,18 @@ public: void checkDefined() const { Valgrind::CheckDefined(temperature_); - Valgrind::CheckDefined(fluidThermalConductivity_); - Valgrind::CheckDefined(soilThermalConductivity_); - Valgrind::CheckDefined(soilDensity_); + Valgrind::CheckDefined(thermalConductivityFluid_); + Valgrind::CheckDefined(thermalConductivitySolid_); + Valgrind::CheckDefined(densitySolid_); Valgrind::CheckDefined(heatCapacity_); } protected: Scalar temperature_[numPhases + 1]; Scalar heatCapacity_; - Scalar soilDensity_; - Scalar soilThermalConductivity_; - Scalar fluidThermalConductivity_[numPhases]; + Scalar densitySolid_; + Scalar thermalConductivitySolid_; + Scalar thermalConductivityFluid_[numPhases]; }; } // end namespace diff --git a/dumux/implicit/mpnc/mpncproperties.hh b/dumux/implicit/mpnc/mpncproperties.hh index 69c6008fae..f7b59891e4 100644 --- a/dumux/implicit/mpnc/mpncproperties.hh +++ b/dumux/implicit/mpnc/mpncproperties.hh @@ -91,8 +91,8 @@ NEW_PROP_TAG(VtkAddInterfacialArea); NEW_PROP_TAG(SpatialParams); //!< The type of the spatial parameters -NEW_PROP_TAG(MaterialLaw); //!< The material law which ought to be used (extracted from the soil) -NEW_PROP_TAG(MaterialLawParams); //!< The context material law (extracted from the soil) +NEW_PROP_TAG(MaterialLaw); //!< The material law which ought to be used (extracted from the spatialParams) +NEW_PROP_TAG(MaterialLawParams); //!< The context material law (extracted from the spatialParams) //! The compositional twophase system of fluids which is considered NEW_PROP_TAG(FluidSystem); diff --git a/dumux/implicit/mpnc/mpncpropertieskinetic.hh b/dumux/implicit/mpnc/mpncpropertieskinetic.hh index db42058cf4..8beb452418 100644 --- a/dumux/implicit/mpnc/mpncpropertieskinetic.hh +++ b/dumux/implicit/mpnc/mpncpropertieskinetic.hh @@ -39,12 +39,12 @@ NEW_TYPE_TAG(BoxMPNCKinetic, INHERITS_FROM(BoxMPNC)); ////////////////////////////////////////////////////////////////// // Property tags ////////////////////////////////////////////////////////////////// -NEW_PROP_TAG(AwnSurface); //!< The material law which ought to be used (extracted from the soil) -NEW_PROP_TAG(AwnSurfaceParams); //!< The context material law (extracted from the soil) -NEW_PROP_TAG(AwsSurface); //!< The material law which ought to be used (extracted from the soil) -NEW_PROP_TAG(AwsSurfaceParams); //!< The context material law (extracted from the soil) -NEW_PROP_TAG(AnsSurface); //!< The material law which ought to be used (extracted from the soil) -NEW_PROP_TAG(AnsSurfaceParams); //!< The context material law (extracted from the soil) +NEW_PROP_TAG(AwnSurface); //!< The material law which ought to be used (extracted from the spatialParams) +NEW_PROP_TAG(AwnSurfaceParams); //!< The context material law (extracted from the spatialParams) +NEW_PROP_TAG(AwsSurface); //!< The material law which ought to be used (extracted from the spatialParams) +NEW_PROP_TAG(AwsSurfaceParams); //!< The context material law (extracted from the spatialParams) +NEW_PROP_TAG(AnsSurface); //!< The material law which ought to be used (extracted from the spatialParams) +NEW_PROP_TAG(AnsSurfaceParams); //!< The context material law (extracted from the spatialParams) NEW_PROP_TAG(VtkAddDeltaP); // !< Output of pressure minus a fixed value SET_BOOL_PROP(MPNC, VtkAddDeltaP, false); diff --git a/test/implicit/mpnc/evaporationatmospherespatialparams.hh b/test/implicit/mpnc/evaporationatmospherespatialparams.hh index 7a822b9ee1..5eec2849a8 100644 --- a/test/implicit/mpnc/evaporationatmospherespatialparams.hh +++ b/test/implicit/mpnc/evaporationatmospherespatialparams.hh @@ -206,8 +206,8 @@ public: porosityFF_ = GET_RUNTIME_PARAM(TypeTag, Scalar, SpatialParams.FreeFlow.porosity); intrinsicPermeabilityFF_ = GET_RUNTIME_PARAM(TypeTag, Scalar, SpatialParams.FreeFlow.permeability); - soilDensity_ = GET_RUNTIME_PARAM(TypeTag, Scalar, SpatialParams.soil.density); - soilThermalConductivity_ = GET_RUNTIME_PARAM(TypeTag, Scalar, SpatialParams.soil.soilThermalConductivity); + densitySolid_ = GET_RUNTIME_PARAM(TypeTag, Scalar, SpatialParams.soil.density); + thermalConductivitySolid_ = GET_RUNTIME_PARAM(TypeTag, Scalar, SpatialParams.soil.soilThermalConductivity); heatCapacity_ = GET_RUNTIME_PARAM(TypeTag, Scalar, SpatialParams.soil.heatCapacity); aWettingNonWettingA1_ = GET_RUNTIME_PARAM(TypeTag, Scalar, SpatialParams.soil.aWettingNonWettingA1); @@ -527,10 +527,10 @@ public: * \param element The finite element * \param fvGeometry The finite volume geometry * \param scvIdx The local index of the sub-control volume */ - const Scalar soilDensity(const Element & element, + const Scalar densitySolid(const Element & element, const FVElementGeometry & fvGeometry, const unsigned int scvIdx) const - { return soilDensity_ ;} // density of solid [kg/m^3] + { return densitySolid_ ;} // density of solid [kg/m^3] /*!\brief Returns the thermal conductivity \f$[W/(m K)]\f$ of the rock matrix. * \param element The finite element @@ -539,7 +539,7 @@ public: const Scalar thermalConductivitySolid(const Element & element, const FVElementGeometry & fvGeometry, const unsigned int scvIdx)const - { return soilThermalConductivity_ ;} // conductivity of solid [W / (m K ) ] + { return thermalConductivitySolid_ ;} // conductivity of solid [W / (m K ) ] /*!\brief Give back whether the tested position (input) is a specific region (porous medium part) in the domain * @@ -614,8 +614,8 @@ private: MaterialLawParams materialParamsFF_ ; // solid parameters - Scalar soilDensity_ ; - Scalar soilThermalConductivity_ ; + Scalar densitySolid_ ; + Scalar thermalConductivitySolid_ ; Scalar heatCapacity_ ; // interfacial area parameters diff --git a/test/implicit/mpnc/obstaclespatialparams.hh b/test/implicit/mpnc/obstaclespatialparams.hh index 2182d159e4..011de1cd02 100644 --- a/test/implicit/mpnc/obstaclespatialparams.hh +++ b/test/implicit/mpnc/obstaclespatialparams.hh @@ -173,68 +173,6 @@ public: return porosity_; } - /*! - * \brief Returns the heat capacity \f$[J/m^3 K]\f$ of the rock matrix. - * - * This is only required for non-isothermal models. - * - * \param element The finite element - * \param fvGeometry The finite volume geometry - * \param scvIdx The local index of the sub-control volume where - * the heat capacity needs to be defined - */ - double heatCapacity(const Element &element, - const FVElementGeometry &fvGeometry, - const unsigned int scvIdx) const - { - return 790. ; // specific heat capacity of granite [J / (kg K)] - } - -// /* IF COMMENTING IN, PUT A ! FOR DOXYGEN -// * \brief Calculate the heat flux \f$[W/m^2]\f$ through the -// * rock matrix based on the temperature gradient \f$[K / m]\f$ -// * -// * This is only required for non-isothermal models. -// * -// * \param heatFlux The result vector -// * \param tempGrad The temperature gradient -// * \param element The current finite element -// * \param fvGeometry The finite volume geometry of the current element -// * \param faceIdx The local index of the sub-control volume face where -// * the matrix heat flux should be calculated -// */ -// void matrixHeatFlux(Vector &heatFlux, -// const FluxVariables &fluxVars, -// const ElementVolumeVariables &vDat, -// const DimWorldVector &tempGrad, -// const Element &element, -// const FVElementGeometry &fvGeometry, -// int faceIdx) const -// { -// static const Scalar lWater = 0.6; // [W / (m K ) ] -// static const Scalar lGranite = 2.8; // [W / (m K ) ] -// -// // arithmetic mean of the liquid saturation and the porosity -// const int i = fluxVars.face().i; -// const int j = fluxVars.face().j; -// Scalar Sl = std::max(0.0, (vDat[i].saturation(wPhaseIdx) + -// vDat[j].saturation(wPhaseIdx)) / 2); -// Scalar poro = (porosity(element, fvGeometry, i) + -// porosity(element, fvGeometry, j)) / 2; -// -// Scalar lsat = pow(lGranite, (1-poro)) * pow(lWater, poro); -// Scalar lDry = pow(lGranite, (1-poro)); -// -// // the heat conductivity of the matrix. in general this is a -// // tensorial value, but we assume isotropic heat conductivity. -// Scalar heatCond = lDry + sqrt(Sl) * (lDry - lsat); -// -// // the matrix heat flux is the negative temperature gradient -// // times the heat conductivity. -// heatFlux = tempGrad; -// heatFlux *= -heatCond; -// } - /*! * \brief Function for defining the parameters needed by constitutive relationships (kr-sw, pc-sw, etc.). * @@ -249,20 +187,6 @@ public: return coarseMaterialParams_; } - Scalar soilDensity(const Element &element, - const FVElementGeometry &fvGeometry, - const unsigned int scvIdx) const - { - return 2700. ; // density of granite [kg/m^3] - } - - Scalar soilThermalConductivity(const Element &element, - const FVElementGeometry &fvGeometry, - const unsigned int scvIdx) const - { - return 2.8; // conductivity of granite [W / (m K ) ] - } - private: /*! * \brief Returns whether a given global position is in the -- GitLab