Skip to content
Snippets Groups Projects
Commit 1a061936 authored by Nima Samkhaniani's avatar Nima Samkhaniani Committed by Kutalmış Berçin
Browse files

ENH: atmPlantCanopyUSource: improve implicit behaviour (fixes #2343)

parent 36c29067
No related branches found
No related tags found
No related merge requests found
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
Copyright (C) 2020 ENERCON GmbH Copyright (C) 2020 ENERCON GmbH
Copyright (C) 2020-2021 OpenCFD Ltd. Copyright (C) 2020-2022 OpenCFD Ltd.
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
This file is part of OpenFOAM. This file is part of OpenFOAM.
...@@ -28,6 +28,7 @@ License ...@@ -28,6 +28,7 @@ License
#include "atmPlantCanopyUSource.H" #include "atmPlantCanopyUSource.H"
#include "addToRunTimeSelectionTable.H" #include "addToRunTimeSelectionTable.H"
#include "fvmSup.H"
// * * * * * * * * * * * * * Static Member Functions * * * * * * * * * * * * // // * * * * * * * * * * * * * Static Member Functions * * * * * * * * * * * * //
...@@ -99,7 +100,7 @@ void Foam::fv::atmPlantCanopyUSource::addSup ...@@ -99,7 +100,7 @@ void Foam::fv::atmPlantCanopyUSource::addSup
if (V_ > VSMALL) if (V_ > VSMALL)
{ {
// (SP:Eq. 42) // (SP:Eq. 42)
eqn -= (plantCd_*leafAreaDensity_*mag(U))*U; eqn -= fvm::Sp(plantCd_*leafAreaDensity_*mag(U), U);
} }
} }
...@@ -115,7 +116,7 @@ void Foam::fv::atmPlantCanopyUSource::addSup ...@@ -115,7 +116,7 @@ void Foam::fv::atmPlantCanopyUSource::addSup
if (V_ > VSMALL) if (V_ > VSMALL)
{ {
eqn -= rho*(plantCd_*leafAreaDensity_*mag(U))*U; eqn -= fvm::Sp(rho*plantCd_*leafAreaDensity_*mag(U), U);
} }
} }
...@@ -132,7 +133,7 @@ void Foam::fv::atmPlantCanopyUSource::addSup ...@@ -132,7 +133,7 @@ void Foam::fv::atmPlantCanopyUSource::addSup
if (V_ > VSMALL) if (V_ > VSMALL)
{ {
eqn -= alpha*rho*(plantCd_*leafAreaDensity_*mag(U))*U; eqn -= fvm::Sp(alpha*rho*plantCd_*leafAreaDensity_*mag(U), U);
} }
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment