From 99fccad43910173fe0f44e906be8de91e4368c49 Mon Sep 17 00:00:00 2001 From: Timo Koch <timokoch@math.uio.no> Date: Fri, 23 Dec 2022 13:51:30 +0000 Subject: [PATCH] Merge branch 'fix/freeflow-allow-partial-proxy-solution' into 'master' [rans] Allow for more general solution types in addDynamciwWallProps See merge request dumux-repositories/dumux!3351 (cherry picked from commit 6da02609901ed753db1a7e64c67a6cc88eb69e71) e0ce8149 [rans] Allow for more general solution types in addDynamciwWallProps --- dumux/freeflow/rans/oneeq/problem.hh | 2 +- dumux/freeflow/rans/problem.hh | 4 +++- dumux/freeflow/rans/twoeq/kepsilon/problem.hh | 2 +- dumux/freeflow/rans/twoeq/komega/problem.hh | 2 +- dumux/freeflow/rans/twoeq/lowrekepsilon/problem.hh | 2 +- dumux/freeflow/rans/twoeq/sst/problem.hh | 2 +- dumux/freeflow/rans/zeroeq/problem.hh | 3 ++- 7 files changed, 10 insertions(+), 7 deletions(-) diff --git a/dumux/freeflow/rans/oneeq/problem.hh b/dumux/freeflow/rans/oneeq/problem.hh index 4c9243eb1a..07f74140e9 100644 --- a/dumux/freeflow/rans/oneeq/problem.hh +++ b/dumux/freeflow/rans/oneeq/problem.hh @@ -59,7 +59,6 @@ class RANSProblemImpl<TypeTag, TurbulenceModel::oneeq> : public RANSProblemBase< using SubControlVolumeFace = typename FVElementGeometry::SubControlVolumeFace; using VolumeVariables = GetPropType<TypeTag, Properties::VolumeVariables>; - using SolutionVector = GetPropType<TypeTag, Properties::SolutionVector>; using PrimaryVariables = GetPropType<TypeTag, Properties::PrimaryVariables>; using CellCenterPrimaryVariables = GetPropType<TypeTag, Properties::CellCenterPrimaryVariables>; using Indices = typename GetPropType<TypeTag, Properties::ModelTraits>::Indices; @@ -88,6 +87,7 @@ public: * * \param curSol The solution vector. */ + template<class SolutionVector> void updateDynamicWallProperties(const SolutionVector& curSol) { ParentType::updateDynamicWallProperties(curSol); diff --git a/dumux/freeflow/rans/problem.hh b/dumux/freeflow/rans/problem.hh index d68ea250bf..2d4c3ac66d 100644 --- a/dumux/freeflow/rans/problem.hh +++ b/dumux/freeflow/rans/problem.hh @@ -69,7 +69,6 @@ class RANSProblemBase : public NavierStokesStaggeredProblem<TypeTag> using SubControlVolume = typename FVElementGeometry::SubControlVolume; using SubControlVolumeFace = typename FVElementGeometry::SubControlVolumeFace; using VolumeVariables = GetPropType<TypeTag, Properties::VolumeVariables>; - using SolutionVector = GetPropType<TypeTag, Properties::SolutionVector>; using PrimaryVariables = typename VolumeVariables::PrimaryVariables; using CellCenterPrimaryVariables = GetPropType<TypeTag, Properties::CellCenterPrimaryVariables>; using FacePrimaryVariables = GetPropType<TypeTag, Properties::FacePrimaryVariables>; @@ -140,6 +139,7 @@ public: * * \param curSol The solution vector. */ + template<class SolutionVector> void updateDynamicWallProperties(const SolutionVector& curSol) { std::cout << "Update dynamic wall properties." << std::endl; @@ -433,6 +433,7 @@ private: } } + template<class SolutionVector> void calculateCCVelocities_(const SolutionVector& curSol) { auto fvGeometry = localView(this->gridGeometry()); @@ -662,6 +663,7 @@ private: } } + template<class SolutionVector> void storeViscosities_(const SolutionVector& curSol) { // calculate or call all secondary variables diff --git a/dumux/freeflow/rans/twoeq/kepsilon/problem.hh b/dumux/freeflow/rans/twoeq/kepsilon/problem.hh index 08b3542b07..ea9cb2c147 100644 --- a/dumux/freeflow/rans/twoeq/kepsilon/problem.hh +++ b/dumux/freeflow/rans/twoeq/kepsilon/problem.hh @@ -66,7 +66,6 @@ class RANSProblemImpl<TypeTag, TurbulenceModel::kepsilon> : public RANSProblemBa using GlobalPosition = typename SubControlVolumeFace::GlobalPosition; using VolumeVariables = GetPropType<TypeTag, Properties::VolumeVariables>; - using SolutionVector = GetPropType<TypeTag, Properties::SolutionVector>; using PrimaryVariables = GetPropType<TypeTag, Properties::PrimaryVariables>; using CellCenterPrimaryVariables = GetPropType<TypeTag, Properties::CellCenterPrimaryVariables>; using FacePrimaryVariables = GetPropType<TypeTag, Properties::FacePrimaryVariables>; @@ -114,6 +113,7 @@ public: * * \param curSol The solution vector. */ + template<class SolutionVector> void updateDynamicWallProperties(const SolutionVector& curSol) { ParentType::updateDynamicWallProperties(curSol); diff --git a/dumux/freeflow/rans/twoeq/komega/problem.hh b/dumux/freeflow/rans/twoeq/komega/problem.hh index 4d7d03e102..cdcd402468 100644 --- a/dumux/freeflow/rans/twoeq/komega/problem.hh +++ b/dumux/freeflow/rans/twoeq/komega/problem.hh @@ -53,7 +53,6 @@ class RANSProblemImpl<TypeTag, TurbulenceModel::komega> : public RANSProblemBase using FVElementGeometry = typename GetPropType<TypeTag, Properties::GridGeometry>::LocalView; using VolumeVariables = GetPropType<TypeTag, Properties::VolumeVariables>; - using SolutionVector = GetPropType<TypeTag, Properties::SolutionVector>; using PrimaryVariables = GetPropType<TypeTag, Properties::PrimaryVariables>; using CellCenterPrimaryVariables = GetPropType<TypeTag, Properties::CellCenterPrimaryVariables>; using Indices = typename GetPropType<TypeTag, Properties::ModelTraits>::Indices; @@ -86,6 +85,7 @@ public: * * \param curSol The solution vector. */ + template<class SolutionVector> void updateDynamicWallProperties(const SolutionVector& curSol) { ParentType::updateDynamicWallProperties(curSol); diff --git a/dumux/freeflow/rans/twoeq/lowrekepsilon/problem.hh b/dumux/freeflow/rans/twoeq/lowrekepsilon/problem.hh index 981ee6491a..4ecd8ea852 100644 --- a/dumux/freeflow/rans/twoeq/lowrekepsilon/problem.hh +++ b/dumux/freeflow/rans/twoeq/lowrekepsilon/problem.hh @@ -53,7 +53,6 @@ class RANSProblemImpl<TypeTag, TurbulenceModel::lowrekepsilon> : public RANSProb using FVElementGeometry = typename GetPropType<TypeTag, Properties::GridGeometry>::LocalView; using VolumeVariables = GetPropType<TypeTag, Properties::VolumeVariables>; - using SolutionVector = GetPropType<TypeTag, Properties::SolutionVector>; using PrimaryVariables = GetPropType<TypeTag, Properties::PrimaryVariables>; using CellCenterPrimaryVariables = GetPropType<TypeTag, Properties::CellCenterPrimaryVariables>; using Indices = typename GetPropType<TypeTag, Properties::ModelTraits>::Indices; @@ -82,6 +81,7 @@ public: * * \param curSol The solution vector. */ + template<class SolutionVector> void updateDynamicWallProperties(const SolutionVector& curSol) { ParentType::updateDynamicWallProperties(curSol); diff --git a/dumux/freeflow/rans/twoeq/sst/problem.hh b/dumux/freeflow/rans/twoeq/sst/problem.hh index 10e8f90bd1..64639051f6 100644 --- a/dumux/freeflow/rans/twoeq/sst/problem.hh +++ b/dumux/freeflow/rans/twoeq/sst/problem.hh @@ -53,7 +53,6 @@ class RANSProblemImpl<TypeTag, TurbulenceModel::sst> : public RANSProblemBase<Ty using FVElementGeometry = typename GetPropType<TypeTag, Properties::GridGeometry>::LocalView; using VolumeVariables = GetPropType<TypeTag, Properties::VolumeVariables>; - using SolutionVector = GetPropType<TypeTag, Properties::SolutionVector>; using PrimaryVariables = GetPropType<TypeTag, Properties::PrimaryVariables>; using CellCenterPrimaryVariables = GetPropType<TypeTag, Properties::CellCenterPrimaryVariables>; using Indices = typename GetPropType<TypeTag, Properties::ModelTraits>::Indices; @@ -87,6 +86,7 @@ public: * * \param curSol The solution vector. */ + template<class SolutionVector> void updateDynamicWallProperties(const SolutionVector& curSol) { ParentType::updateDynamicWallProperties(curSol); diff --git a/dumux/freeflow/rans/zeroeq/problem.hh b/dumux/freeflow/rans/zeroeq/problem.hh index 398b0ada6c..3cec7f039b 100644 --- a/dumux/freeflow/rans/zeroeq/problem.hh +++ b/dumux/freeflow/rans/zeroeq/problem.hh @@ -59,7 +59,6 @@ class RANSProblemImpl<TypeTag, TurbulenceModel::zeroeq> : public RANSProblemBase using FVElementGeometry = typename GetPropType<TypeTag, Properties::GridGeometry>::LocalView; using SubControlVolumeFace = typename FVElementGeometry::SubControlVolumeFace; using VolumeVariables = GetPropType<TypeTag, Properties::VolumeVariables>; - using SolutionVector = GetPropType<TypeTag, Properties::SolutionVector>; using PrimaryVariables = GetPropType<TypeTag, Properties::PrimaryVariables>; using CellCenterPrimaryVariables = GetPropType<TypeTag, Properties::CellCenterPrimaryVariables>; using Indices = typename GetPropType<TypeTag, Properties::ModelTraits>::Indices; @@ -105,6 +104,7 @@ public: * * \param curSol The solution vector. */ + template<class SolutionVector> void updateDynamicWallProperties(const SolutionVector& curSol) { ParentType::updateDynamicWallProperties(curSol); @@ -238,6 +238,7 @@ public: private: + template<class SolutionVector> void calculateRoughnessLength_(const SolutionVector& curSol) { bool printedRangeWarning = false; -- GitLab