Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
V
VirtualFluids
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
iRMB
VirtualFluids
Commits
9b09b5dc
Commit
9b09b5dc
authored
2 years ago
by
Henrik Asmuth
Browse files
Options
Downloads
Patches
Plain Diff
Add geostrophic wind option to BoundaryLayer
parent
680bf893
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!143
Experimental merge
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
apps/gpu/LBM/BoundaryLayer/BoundaryLayer.cpp
+14
-5
14 additions, 5 deletions
apps/gpu/LBM/BoundaryLayer/BoundaryLayer.cpp
with
14 additions
and
5 deletions
apps/gpu/LBM/BoundaryLayer/BoundaryLayer.cpp
+
14
−
5
View file @
9b09b5dc
...
@@ -118,6 +118,8 @@ void multipleLevel(const std::string& configPath)
...
@@ -118,6 +118,8 @@ void multipleLevel(const std::string& configPath)
const
uint
nodes_per_H
=
config
.
contains
(
"nz"
)
?
config
.
getValue
<
uint
>
(
"nz"
)
:
64
;
const
uint
nodes_per_H
=
config
.
contains
(
"nz"
)
?
config
.
getValue
<
uint
>
(
"nz"
)
:
64
;
const
bool
driveWithGeostrophicWind
=
config
.
contains
(
"driveWithGeostrophicWind"
)
?
config
.
getValue
<
bool
>
(
"driveWithGeostrophicWind"
)
:
false
;
// all in s
// all in s
const
float
tStartOut
=
config
.
getValue
<
real
>
(
"tStartOut"
);
const
float
tStartOut
=
config
.
getValue
<
real
>
(
"tStartOut"
);
const
float
tOut
=
config
.
getValue
<
real
>
(
"tOut"
);
const
float
tOut
=
config
.
getValue
<
real
>
(
"tOut"
);
...
@@ -155,7 +157,7 @@ void multipleLevel(const std::string& configPath)
...
@@ -155,7 +157,7 @@ void multipleLevel(const std::string& configPath)
para
->
setPrintFiles
(
true
);
para
->
setPrintFiles
(
true
);
para
->
setForcing
(
pressureGradientLB
,
0
,
0
);
if
(
!
driveWithGeostrophicWind
)
para
->
setForcing
(
pressureGradientLB
,
0
,
0
);
para
->
setVelocityLB
(
velocityLB
);
para
->
setVelocityLB
(
velocityLB
);
para
->
setViscosityLB
(
viscosityLB
);
para
->
setViscosityLB
(
viscosityLB
);
para
->
setVelocityRatio
(
dx
/
dt
);
para
->
setVelocityRatio
(
dx
/
dt
);
...
@@ -200,10 +202,17 @@ void multipleLevel(const std::string& configPath)
...
@@ -200,10 +202,17 @@ void multipleLevel(const std::string& configPath)
para
->
setHasWallModelMonitor
(
true
);
para
->
setHasWallModelMonitor
(
true
);
bcFactory
.
setStressBoundaryCondition
(
BoundaryConditionFactory
::
StressBC
::
StressPressureBounceBack
);
bcFactory
.
setStressBoundaryCondition
(
BoundaryConditionFactory
::
StressBC
::
StressPressureBounceBack
);
if
(
driveWithGeostrophicWind
)
// gridBuilder->setVelocityBoundaryCondition(SideType::PZ, 0.0, 0.0, 0.0);
{
gridBuilder
->
setSlipBoundaryCondition
(
SideType
::
PZ
,
0.0
,
0.0
,
0.0
);
real
u_geostrophic
=
u_star
/
0.4
*
log
(
H
/
z0
)
*
dt
/
dx
;
bcFactory
.
setSlipBoundaryCondition
(
BoundaryConditionFactory
::
SlipBC
::
SlipBounceBack
);
//SlipCompressibleTurbulentViscosity
gridBuilder
->
setVelocityBoundaryCondition
(
SideType
::
PZ
,
u_geostrophic
,
0.0
,
0.0
);
bcFactory
.
setVelocityBoundaryCondition
(
BoundaryConditionFactory
::
VelocityBC
::
VelocityCompressible
);
}
else
//drive with pressure gradient
{
gridBuilder
->
setSlipBoundaryCondition
(
SideType
::
PZ
,
0.0
,
0.0
,
0.0
);
bcFactory
.
setSlipBoundaryCondition
(
BoundaryConditionFactory
::
SlipBC
::
SlipBounceBack
);
}
real
cPi
=
3.1415926535897932384626433832795
;
real
cPi
=
3.1415926535897932384626433832795
;
para
->
setInitialCondition
([
&
](
real
coordX
,
real
coordY
,
real
coordZ
,
real
&
rho
,
real
&
vx
,
real
&
vy
,
real
&
vz
)
{
para
->
setInitialCondition
([
&
](
real
coordX
,
real
coordY
,
real
coordZ
,
real
&
rho
,
real
&
vx
,
real
&
vy
,
real
&
vz
)
{
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment