From c8a2325322ec3ed978b2ab0f4a19845348d5c72b Mon Sep 17 00:00:00 2001 From: Ned Coltman <edward.coltman@iws.uni-stuttgart.de> Date: Tue, 15 Feb 2022 14:51:17 +0100 Subject: [PATCH] [test][freeflow][spatialparams] move temperature method to spatial params --- examples/freeflowchannel/params.input | 3 +++ examples/freeflowchannel/problem.hh | 7 ------- examples/liddrivencavity/params_re1.input | 3 +++ examples/liddrivencavity/params_re1000.input | 3 +++ examples/liddrivencavity/problem.hh | 7 ------- .../freeflow/navierstokes/angeli/params.input | 3 +++ test/freeflow/navierstokes/angeli/problem.hh | 7 ------- .../navierstokes/channel/1d/params.input | 3 +++ .../navierstokes/channel/1d/problem.hh | 14 ++++---------- .../navierstokes/channel/2d/problem.hh | 11 +---------- .../navierstokes/channel/3d/problem.hh | 10 +--------- .../navierstokes/channel/pipe/params.input | 3 +++ .../navierstokes/channel/pipe/problem.hh | 3 --- test/freeflow/navierstokes/donea/params.input | 3 +++ test/freeflow/navierstokes/donea/problem.hh | 2 -- .../navierstokes/kovasznay/params.input | 3 +++ .../navierstokes/kovasznay/problem.hh | 13 ++----------- .../navierstokes/periodic/params.input | 3 +++ .../freeflow/navierstokes/periodic/problem.hh | 14 -------------- .../freeflow/navierstokes/sincos/params.input | 3 +++ test/freeflow/navierstokes/sincos/problem.hh | 8 -------- .../channel/params_advection.input | 3 +++ .../channel/params_advectionni.input | 3 +++ .../channel/params_diffusion.input | 3 +++ .../channel/params_diffusionni.input | 3 +++ .../navierstokesnc/channel/problem.hh | 14 -------------- .../densitydrivenflow/problem.hh | 14 -------------- .../navierstokesnc/maxwellstefan/problem.hh | 11 ++--------- test/freeflow/rans/params.input | 3 +++ test/freeflow/rans/params_nonisothermal.input | 3 +++ .../params_nonisothermal_wallfunction.input | 3 +++ test/freeflow/rans/params_wallfunction.input | 3 +++ test/freeflow/rans/problem.hh | 19 +++---------------- test/freeflow/ransnc/params.input | 3 +++ .../ransnc/params_nonisothermal.input | 3 +++ .../params_nonisothermal_wallfunction.input | 3 +++ .../freeflow/ransnc/params_wallfunction.input | 3 +++ test/freeflow/ransnc/problem.hh | 19 +++++-------------- .../vtk/test_vtk_staggeredfreeflowpvnames.cc | 3 --- 39 files changed, 84 insertions(+), 158 deletions(-) diff --git a/examples/freeflowchannel/params.input b/examples/freeflowchannel/params.input index 623d2f8e56..7f6dd452d7 100644 --- a/examples/freeflowchannel/params.input +++ b/examples/freeflowchannel/params.input @@ -18,3 +18,6 @@ MaxRelativeShift = 1e-8 [Vtk] WriteFaceData = false + +[SpatialParams] +Temperature = 283.15 diff --git a/examples/freeflowchannel/problem.hh b/examples/freeflowchannel/problem.hh index ed780c4d2d..d12d8058a9 100644 --- a/examples/freeflowchannel/problem.hh +++ b/examples/freeflowchannel/problem.hh @@ -135,13 +135,6 @@ public: } // [[/codeblock]] - // #### Temperature distribution - // We need to specify a constant temperature for our isothermal problem. - // Fluid properties that depend on temperature will be calculated with this value. - // This would be important if another fluidsystem was used. - Scalar temperature() const - { return 273.15 + 10; } - // The inlet is on the left side of the physical domain. // [[codeblock]] private: diff --git a/examples/liddrivencavity/params_re1.input b/examples/liddrivencavity/params_re1.input index 3dc7e70ec1..bf0417e148 100644 --- a/examples/liddrivencavity/params_re1.input +++ b/examples/liddrivencavity/params_re1.input @@ -24,3 +24,6 @@ MaxRelativeShift = 1e-5 [Vtk] WriteFaceData = false + +[SpatialParams] +Temperature = 283.15 diff --git a/examples/liddrivencavity/params_re1000.input b/examples/liddrivencavity/params_re1000.input index c8b78fb851..1541e194de 100644 --- a/examples/liddrivencavity/params_re1000.input +++ b/examples/liddrivencavity/params_re1000.input @@ -27,3 +27,6 @@ WriteFaceData = false [Flux] UpwindWeight = 0.5 # set to 0.5 for reproducing Ghia et al. (1982) + +[SpatialParams] +Temperature = 283.15 diff --git a/examples/liddrivencavity/problem.hh b/examples/liddrivencavity/problem.hh index 9d6ecc4693..a56013265e 100644 --- a/examples/liddrivencavity/problem.hh +++ b/examples/liddrivencavity/problem.hh @@ -74,13 +74,6 @@ public: } // [[/codeblock]] - // #### Temperature distribution - // We need to specify a constant temperature for our isothermal problem. - // Fluid properties that depend on temperature will be calculated with this value. - // This would be important if another fluidsystem was used. - Scalar temperature() const - { return 273.15 + 10; } // 10°C - // #### Boundary conditions // With the following function we define the __type of boundary conditions__ depending on the location. // Three types of boundary conditions can be specified: Dirichlet or Neumann boundary conditions. On diff --git a/test/freeflow/navierstokes/angeli/params.input b/test/freeflow/navierstokes/angeli/params.input index d475e9a494..a393fd21bd 100644 --- a/test/freeflow/navierstokes/angeli/params.input +++ b/test/freeflow/navierstokes/angeli/params.input @@ -26,3 +26,6 @@ MaxRelativeShift = 1e-5 [Vtk] WriteFaceData = false + +[SpatialParams] +Temperature = 293.15 diff --git a/test/freeflow/navierstokes/angeli/problem.hh b/test/freeflow/navierstokes/angeli/problem.hh index 546a89f2b0..43f667b004 100644 --- a/test/freeflow/navierstokes/angeli/problem.hh +++ b/test/freeflow/navierstokes/angeli/problem.hh @@ -83,13 +83,6 @@ public: interpolateExactVelocity_ = getParam<bool>("Problem.InterpolateExactVelocity", false); } - /*! - * \brief Returns the temperature within the domain in [K]. - * This problem assumes a temperature of 20 degrees Celsius (unused) - */ - Scalar temperature() const - { return 293.15; } - /*! * \name Boundary conditions */ diff --git a/test/freeflow/navierstokes/channel/1d/params.input b/test/freeflow/navierstokes/channel/1d/params.input index af9175762c..593911a5e8 100644 --- a/test/freeflow/navierstokes/channel/1d/params.input +++ b/test/freeflow/navierstokes/channel/1d/params.input @@ -18,3 +18,6 @@ MaxRelativeShift = 1e-9 [Vtk] WriteFaceData = false + +[SpatialParams] +Temperature = 298.0 diff --git a/test/freeflow/navierstokes/channel/1d/problem.hh b/test/freeflow/navierstokes/channel/1d/problem.hh index fa0de2599a..deec5b721c 100644 --- a/test/freeflow/navierstokes/channel/1d/problem.hh +++ b/test/freeflow/navierstokes/channel/1d/problem.hh @@ -73,13 +73,7 @@ public: kinematicViscosity_ = getParam<Scalar>("Component.LiquidKinematicViscosity"); } - /*! - * \brief Returns the temperature within the domain in [K]. - */ - Scalar temperature() const - { return 298.0; } - - /*! + /*! * \brief Returns the sources within the domain. * * \param globalPos The global position @@ -129,12 +123,12 @@ public: return source; } // \} - /*! + /*! * \name Boundary conditions */ // \{ - /*! + /*! * \brief Specifies which kind of boundary condition should be * used for which equation on a given boundary control volume. * @@ -155,7 +149,7 @@ public: return values; } - /*! + /*! * \brief Returns Dirichlet boundary values at a given position * * \param globalPos The global position diff --git a/test/freeflow/navierstokes/channel/2d/problem.hh b/test/freeflow/navierstokes/channel/2d/problem.hh index 1529068135..bcde26ecb9 100644 --- a/test/freeflow/navierstokes/channel/2d/problem.hh +++ b/test/freeflow/navierstokes/channel/2d/problem.hh @@ -102,16 +102,7 @@ public: outletPressure_ = getParam<Scalar>("Problem.OutletPressure", 1.1e5); } - /*! - * \brief Returns the temperature within the domain in [K]. - * - * This problem assumes a temperature of 10 degrees Celsius. - */ - Scalar temperature() const - { return 273.15 + 10; } // 10C - - // \} - /*! + /*! * \name Boundary conditions */ // \{ diff --git a/test/freeflow/navierstokes/channel/3d/problem.hh b/test/freeflow/navierstokes/channel/3d/problem.hh index 4de11aecaf..403a1d59bc 100644 --- a/test/freeflow/navierstokes/channel/3d/problem.hh +++ b/test/freeflow/navierstokes/channel/3d/problem.hh @@ -94,15 +94,6 @@ public: */ // \{ - /*! - * \brief Returns the temperature within the domain in [K]. - * - * This problem assumes a temperature of 10 degrees Celsius. - */ - Scalar temperature() const - { return 273.15 + 10; } // 10C - - /*! * \brief Evaluates the source term for all phases within a given * sub-control volume @@ -126,6 +117,7 @@ public: } // \} + /*! * \name Boundary conditions */ diff --git a/test/freeflow/navierstokes/channel/pipe/params.input b/test/freeflow/navierstokes/channel/pipe/params.input index 66b549898c..f1c7f2d348 100644 --- a/test/freeflow/navierstokes/channel/pipe/params.input +++ b/test/freeflow/navierstokes/channel/pipe/params.input @@ -22,3 +22,6 @@ AddVelocity = 1 [Assembly] NumericDifference.BaseEpsilon = 1e-3 + +[SpatialParams] +Temperature = 293.15 diff --git a/test/freeflow/navierstokes/channel/pipe/problem.hh b/test/freeflow/navierstokes/channel/pipe/problem.hh index f32718012d..e03753c79d 100644 --- a/test/freeflow/navierstokes/channel/pipe/problem.hh +++ b/test/freeflow/navierstokes/channel/pipe/problem.hh @@ -78,9 +78,6 @@ public: return name_; } - Scalar temperature() const - { return 293.15; } - /*! * \brief Specifies which kind of boundary condition should be * used for which equation on a given boundary segment. diff --git a/test/freeflow/navierstokes/donea/params.input b/test/freeflow/navierstokes/donea/params.input index 224ffc14c3..20acc796b9 100644 --- a/test/freeflow/navierstokes/donea/params.input +++ b/test/freeflow/navierstokes/donea/params.input @@ -30,3 +30,6 @@ AmgAccumulationMode = atOnce [Assembly] NumericDifference.BaseEpsilon = 1e-8 + +[SpatialParams] +Temperature = 298.0 diff --git a/test/freeflow/navierstokes/donea/problem.hh b/test/freeflow/navierstokes/donea/problem.hh index d1bb8694ee..d00ef32165 100644 --- a/test/freeflow/navierstokes/donea/problem.hh +++ b/test/freeflow/navierstokes/donea/problem.hh @@ -82,8 +82,6 @@ public: */ // \{ - Scalar temperature() const { return 298.0; } - /*! * \brief Return the sources within the domain. * diff --git a/test/freeflow/navierstokes/kovasznay/params.input b/test/freeflow/navierstokes/kovasznay/params.input index 4030848205..59ff3366c3 100644 --- a/test/freeflow/navierstokes/kovasznay/params.input +++ b/test/freeflow/navierstokes/kovasznay/params.input @@ -26,3 +26,6 @@ WriteFaceData = false [Flux] UpwindWeight = 0.5 + +[SpatialParams] +Temperature = 298.0 diff --git a/test/freeflow/navierstokes/kovasznay/problem.hh b/test/freeflow/navierstokes/kovasznay/problem.hh index ac293f4bd6..c323d490f5 100644 --- a/test/freeflow/navierstokes/kovasznay/problem.hh +++ b/test/freeflow/navierstokes/kovasznay/problem.hh @@ -76,21 +76,12 @@ public: - std::sqrt(reynoldsNumber * reynoldsNumber * 0.25 + 4.0 * M_PI * M_PI); } - /*! - * \brief Returns the temperature within the domain in [K]. - * - * This problem assumes a temperature of 10 degrees Celsius. - */ - Scalar temperature() const - { return 298.0; } - - // \} - /*! + /*! * \name Boundary conditions */ // \{ - /*! + /*! * \brief Specifies which kind of boundary condition should be * used for which equation on a given boundary control volume. * diff --git a/test/freeflow/navierstokes/periodic/params.input b/test/freeflow/navierstokes/periodic/params.input index a39a3b0764..f73e3b13ef 100644 --- a/test/freeflow/navierstokes/periodic/params.input +++ b/test/freeflow/navierstokes/periodic/params.input @@ -25,3 +25,6 @@ UpwindWeight = 0.5 [Assembly] NumericDifference.BaseEpsilon = 1e-4 + +[SpatialParams] +Temperature = 298.0 diff --git a/test/freeflow/navierstokes/periodic/problem.hh b/test/freeflow/navierstokes/periodic/problem.hh index 395b64a66b..f65281d09e 100644 --- a/test/freeflow/navierstokes/periodic/problem.hh +++ b/test/freeflow/navierstokes/periodic/problem.hh @@ -65,20 +65,6 @@ public: usePressureDifference_ = getParam<bool>("Problem.UsePressureDifference", false); } - /*! - * \name Problem parameters - */ - // \{ - - /*! - * \brief Returns the temperature within the domain in [K]. - * - * This problem assumes a temperature of 10 degrees Celsius. - */ - Scalar temperature() const - { return 298.0; } - - // \} /*! * \name Boundary conditions */ diff --git a/test/freeflow/navierstokes/sincos/params.input b/test/freeflow/navierstokes/sincos/params.input index 9d5dfa0eba..8855fb9260 100644 --- a/test/freeflow/navierstokes/sincos/params.input +++ b/test/freeflow/navierstokes/sincos/params.input @@ -45,3 +45,6 @@ GMResRestart = 50 Type = uzawa Verbosity = 1 Iterations = 5 + +[SpatialParams] +Temperature = 298.0 diff --git a/test/freeflow/navierstokes/sincos/problem.hh b/test/freeflow/navierstokes/sincos/problem.hh index dc1143bc9d..e734640a93 100644 --- a/test/freeflow/navierstokes/sincos/problem.hh +++ b/test/freeflow/navierstokes/sincos/problem.hh @@ -76,14 +76,6 @@ public: useNeumann_ = getParam<bool>("Problem.UseNeumann", false); } - /*! - * \brief Returns the temperature within the domain in [K]. - * - * This problem assumes a temperature of 10 degrees Celsius. - */ - Scalar temperature() const - { return 298.0; } - /*! * \brief Return the sources within the domain. * diff --git a/test/freeflow/navierstokesnc/channel/params_advection.input b/test/freeflow/navierstokesnc/channel/params_advection.input index 6b78690db5..0312d98552 100644 --- a/test/freeflow/navierstokesnc/channel/params_advection.input +++ b/test/freeflow/navierstokesnc/channel/params_advection.input @@ -20,3 +20,6 @@ MaxRelativeShift = 1e-8 [Vtk] WriteFaceData = false + +[SpatialParams] +Temperature = 283.15 diff --git a/test/freeflow/navierstokesnc/channel/params_advectionni.input b/test/freeflow/navierstokesnc/channel/params_advectionni.input index 445d411b7d..cef467f515 100644 --- a/test/freeflow/navierstokesnc/channel/params_advectionni.input +++ b/test/freeflow/navierstokesnc/channel/params_advectionni.input @@ -20,3 +20,6 @@ MaxRelativeShift = 1e-8 [Vtk] WriteFaceData = false + +[SpatialParams] +Temperature = 283.15 diff --git a/test/freeflow/navierstokesnc/channel/params_diffusion.input b/test/freeflow/navierstokesnc/channel/params_diffusion.input index 1dae92d733..4aac5c2d70 100644 --- a/test/freeflow/navierstokesnc/channel/params_diffusion.input +++ b/test/freeflow/navierstokesnc/channel/params_diffusion.input @@ -18,3 +18,6 @@ MaxRelativeShift = 1e-12 [Vtk] WriteFaceData = false + +[SpatialParams] +Temperature = 283.15 diff --git a/test/freeflow/navierstokesnc/channel/params_diffusionni.input b/test/freeflow/navierstokesnc/channel/params_diffusionni.input index 0383369d9a..574ec21450 100644 --- a/test/freeflow/navierstokesnc/channel/params_diffusionni.input +++ b/test/freeflow/navierstokesnc/channel/params_diffusionni.input @@ -17,3 +17,6 @@ MaxRelativeShift = 1e-8 [Vtk] WriteFaceData = false + +[SpatialParams] +Temperature = 283.15 diff --git a/test/freeflow/navierstokesnc/channel/problem.hh b/test/freeflow/navierstokesnc/channel/problem.hh index 3eca45c6bc..3cce1ceb54 100644 --- a/test/freeflow/navierstokesnc/channel/problem.hh +++ b/test/freeflow/navierstokesnc/channel/problem.hh @@ -75,20 +75,6 @@ public: deltaP_.resize(this->gridGeometry().numCellCenterDofs()); } - /*! - * \name Problem parameters - */ - // \{ - - /*! - * \brief Returns the temperature within the domain in [K]. - * - * This problem assumes a temperature of 10 degrees Celsius. - */ - Scalar temperature() const - { return 273.15 + 10; } // 10C - - // \} /*! * \name Boundary conditions */ diff --git a/test/freeflow/navierstokesnc/densitydrivenflow/problem.hh b/test/freeflow/navierstokesnc/densitydrivenflow/problem.hh index 81442185dd..5d562ddc24 100644 --- a/test/freeflow/navierstokesnc/densitydrivenflow/problem.hh +++ b/test/freeflow/navierstokesnc/densitydrivenflow/problem.hh @@ -75,20 +75,6 @@ public: deltaRho_.resize(this->gridGeometry().numCellCenterDofs()); } - /*! - * \name Problem parameters - */ - // \{ - - /*! - * \brief Returns the temperature within the domain in [K]. - * - * This problem assumes a temperature of 10 degrees Celsius. - */ - Scalar temperature() const - { return 273.15 + 10; } // 10C - - // \} /*! * \name Boundary conditions */ diff --git a/test/freeflow/navierstokesnc/maxwellstefan/problem.hh b/test/freeflow/navierstokesnc/maxwellstefan/problem.hh index de92e3cbd3..fcf13b6b3d 100644 --- a/test/freeflow/navierstokesnc/maxwellstefan/problem.hh +++ b/test/freeflow/navierstokesnc/maxwellstefan/problem.hh @@ -167,16 +167,9 @@ public: } } - /*! - * \brief Returns the temperature within the domain in [K]. - * - * This problem assumes a temperature of 10 degrees Celsius. - */ - Scalar temperature() const - { return 273.15 + 10; } // 10C - // \} - /*! + + /*! * \name Boundary conditions */ // \{ diff --git a/test/freeflow/rans/params.input b/test/freeflow/rans/params.input index c090b55bd2..7cc5cf0303 100644 --- a/test/freeflow/rans/params.input +++ b/test/freeflow/rans/params.input @@ -33,3 +33,6 @@ MaxRelativeShift = 1e-6 [Vtk] WriteFaceData = false + +[SpatialParams] +Temperature = 283.15 diff --git a/test/freeflow/rans/params_nonisothermal.input b/test/freeflow/rans/params_nonisothermal.input index 7b2605d904..4474096747 100644 --- a/test/freeflow/rans/params_nonisothermal.input +++ b/test/freeflow/rans/params_nonisothermal.input @@ -35,3 +35,6 @@ MaxRelativeShift = 1e-9 [Vtk] WriteFaceData = false + +[SpatialParams] +Temperature = 283.15 diff --git a/test/freeflow/rans/params_nonisothermal_wallfunction.input b/test/freeflow/rans/params_nonisothermal_wallfunction.input index 014ec99258..3ed580fc50 100644 --- a/test/freeflow/rans/params_nonisothermal_wallfunction.input +++ b/test/freeflow/rans/params_nonisothermal_wallfunction.input @@ -35,3 +35,6 @@ MaxRelativeShift = 1e-8 [Vtk] WriteFaceData = true + +[SpatialParams] +Temperature = 283.15 diff --git a/test/freeflow/rans/params_wallfunction.input b/test/freeflow/rans/params_wallfunction.input index 6c8309aad6..c74c76d9f4 100644 --- a/test/freeflow/rans/params_wallfunction.input +++ b/test/freeflow/rans/params_wallfunction.input @@ -35,3 +35,6 @@ MaxRelativeShift = 1e-5 [Vtk] WriteFaceData = true + +[SpatialParams] +Temperature = 283.15 diff --git a/test/freeflow/rans/problem.hh b/test/freeflow/rans/problem.hh index 73ad3d0a6d..9abb8be0a8 100644 --- a/test/freeflow/rans/problem.hh +++ b/test/freeflow/rans/problem.hh @@ -83,7 +83,7 @@ public: Dumux::TurbulenceProperties<Scalar, dimWorld, true> turbulenceProperties; FluidState fluidState; fluidState.setPressure(0, 1e5); - fluidState.setTemperature(temperature()); + fluidState.setTemperature(this->spatialParams().temperatureAtPos({})); Scalar density = FluidSystem::density(fluidState, 0); Scalar kinematicViscosity = FluidSystem::viscosity(fluidState, 0) / density; Scalar diameter = this->gridGeometry().bBoxMax()[1] - this->gridGeometry().bBoxMin()[1]; @@ -107,25 +107,12 @@ public: std::cout << std::endl; } - /*! - * \name Problem parameters - */ - // \{ - - /*! - * \brief Returns the temperature [K] within the domain for the isothermal model. - */ - Scalar temperature() const - { return inletTemperature_; } - - // \} - - /*! + /*! * \name Boundary conditions */ // \{ - /*! + /*! * \brief Specifies which kind of boundary condition should be * used for which equation on a given boundary control volume. * diff --git a/test/freeflow/ransnc/params.input b/test/freeflow/ransnc/params.input index 8adc39df1d..d70730785c 100644 --- a/test/freeflow/ransnc/params.input +++ b/test/freeflow/ransnc/params.input @@ -32,3 +32,6 @@ NumericEpsilon.BaseEpsilon = 1e-8 [Newton] MaxSteps = 8 MaxRelativeShift = 1e-9 + +[SpatialParams] +Temperature = 283.15 diff --git a/test/freeflow/ransnc/params_nonisothermal.input b/test/freeflow/ransnc/params_nonisothermal.input index 20baf29174..537a5fe34e 100644 --- a/test/freeflow/ransnc/params_nonisothermal.input +++ b/test/freeflow/ransnc/params_nonisothermal.input @@ -30,3 +30,6 @@ NumericDifferenceMethod = 0 MaxSteps = 10 TargetSteps = 8 MaxRelativeShift = 1e-5 + +[SpatialParams] +Temperature = 283.15 diff --git a/test/freeflow/ransnc/params_nonisothermal_wallfunction.input b/test/freeflow/ransnc/params_nonisothermal_wallfunction.input index 5b94e694f0..af3cf60ec0 100644 --- a/test/freeflow/ransnc/params_nonisothermal_wallfunction.input +++ b/test/freeflow/ransnc/params_nonisothermal_wallfunction.input @@ -31,3 +31,6 @@ NumericDifferenceMethod = 0 MaxSteps = 10 TargetSteps = 8 MaxRelativeShift = 1e-5 + +[SpatialParams] +Temperature = 283.15 diff --git a/test/freeflow/ransnc/params_wallfunction.input b/test/freeflow/ransnc/params_wallfunction.input index 4bab598d7e..5713d932d0 100644 --- a/test/freeflow/ransnc/params_wallfunction.input +++ b/test/freeflow/ransnc/params_wallfunction.input @@ -35,3 +35,6 @@ NumericEpsilon.BaseEpsilon = 1e-8 MaxSteps = 10 TargetSteps = 8 MaxRelativeShift = 1e-5 + +[SpatialParams] +Temperature = 283.15 diff --git a/test/freeflow/ransnc/problem.hh b/test/freeflow/ransnc/problem.hh index 6111a5da9d..6e5681c3ea 100644 --- a/test/freeflow/ransnc/problem.hh +++ b/test/freeflow/ransnc/problem.hh @@ -89,7 +89,7 @@ public: FluidState fluidState; const auto phaseIdx = 0; fluidState.setPressure(phaseIdx, 1e5); - fluidState.setTemperature(temperature()); + fluidState.setTemperature(this->spatialParams().temperatureAtPos({})); fluidState.setMassFraction(phaseIdx, phaseIdx, 1.0); Scalar density = FluidSystem::density(fluidState, phaseIdx); Scalar kinematicViscosity = FluidSystem::viscosity(fluidState, phaseIdx) / density; @@ -105,21 +105,12 @@ public: std::cout << std::endl; } - /*! - * \brief Returns the temperature within the domain in [K]. - * - * The isothermal problem assumes a temperature of 10 degrees Celsius. - */ - Scalar temperature() const - { return 273.15 + 10; } // 10C - - // \} - /*! + /*! * \name Boundary conditions */ // \{ - /*! + /*! * \brief Specifies which kind of boundary condition should be * used for which equation on a given boundary control volume. * @@ -198,7 +189,7 @@ public: } #if NONISOTHERMAL - values[Indices::temperatureIdx] = (isLowerWall_(globalPos) && time() > 10.0) ? wallTemperature_ : temperature(); + values[Indices::temperatureIdx] = (isLowerWall_(globalPos) && time() > 10.0) ? wallTemperature_ : inletTemperature_; #endif return values; @@ -235,7 +226,7 @@ public: values[Indices::pressureIdx] = 1.0e+5; values[transportCompIdx] = 0.0; #if NONISOTHERMAL - values[Indices::temperatureIdx] = temperature(); + values[Indices::temperatureIdx] = inletTemperature_; #endif // block velocity profile values[Indices::velocityXIdx] = 0.0; diff --git a/test/io/vtk/test_vtk_staggeredfreeflowpvnames.cc b/test/io/vtk/test_vtk_staggeredfreeflowpvnames.cc index ab17041711..f502115f29 100644 --- a/test/io/vtk/test_vtk_staggeredfreeflowpvnames.cc +++ b/test/io/vtk/test_vtk_staggeredfreeflowpvnames.cc @@ -148,9 +148,6 @@ private: PrimaryVariables dirichletAtPos(const GlobalPosition &globalPos) const { return PrimaryVariables(0.0); } - Scalar temperature() const - { return 300; } - template<class T = TTag, bool enable = GetPropType<T, Properties::ModelTraits>::usesTurbulenceModel(), std::enable_if_t<!enable, int> = 0> void updateStaticWallProperties() {} -- GitLab