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
2e73edd8
Commit
2e73edd8
authored
2 years ago
by
Henrik Asmuth
Browse files
Options
Downloads
Patches
Plain Diff
mods in BoundaryLayer for precursor read and write
parent
80a2d6f0
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!170
Kernel templetization and efficiency improvements
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
apps/gpu/LBM/BoundaryLayer/BoundaryLayer.cpp
+16
-28
16 additions, 28 deletions
apps/gpu/LBM/BoundaryLayer/BoundaryLayer.cpp
with
16 additions
and
28 deletions
apps/gpu/LBM/BoundaryLayer/BoundaryLayer.cpp
+
16
−
28
View file @
2e73edd8
...
...
@@ -147,8 +147,6 @@ void multipleLevel(const std::string& configPath)
posXPrecursor
=
config
.
getValue
<
real
>
(
"posXPrecursor"
);
useDistributions
=
config
.
getValue
<
bool
>
(
"useDistributions"
,
false
);
precursorDirectory
=
config
.
getValue
<
std
::
string
>
(
"precursorDirectory"
);
}
const
bool
readPrecursor
=
config
.
getValue
(
"readPrecursor"
,
false
);
...
...
@@ -158,8 +156,8 @@ void multipleLevel(const std::string& configPath)
nTReadPrecursor
=
config
.
getValue
<
int
>
(
"nTimestepsReadPrecursor"
);
precursorDirectory
=
config
.
getValue
<
std
::
string
>
(
"precursorDirectory"
);
useDistributions
=
config
.
getValue
<
bool
>
(
"useDistributions"
,
false
);
}
// all in s
const
float
tStartOut
=
config
.
getValue
<
real
>
(
"tStartOut"
);
const
float
tOut
=
config
.
getValue
<
real
>
(
"tOut"
);
...
...
@@ -247,7 +245,6 @@ void multipleLevel(const std::string& configPath)
xGridMax
+=
overlap
;
xGridMin
-=
overlap
;
}
gridBuilder
->
setPeriodicBoundaryCondition
(
!
readPrecursor
,
true
,
false
);
gridBuilder
->
addCoarseGrid
(
xGridMin
,
0.0
,
0.0
,
xGridMax
,
L_y
,
L_z
,
dx
);
...
...
@@ -267,7 +264,7 @@ void multipleLevel(const std::string& configPath)
}
else
{
gridBuilder
->
setPeriodicBoundaryCondition
(
true
,
true
,
false
);
gridBuilder
->
setPeriodicBoundaryCondition
(
!
readPrecursor
,
true
,
false
);
}
gridBuilder
->
buildGrids
(
lbmOrGks
,
true
);
// buildGrids() has to be called before setting the BCs!!!!
...
...
@@ -285,12 +282,12 @@ void multipleLevel(const std::string& configPath)
gridBuilder
->
setCommunicationProcess
(
CommunicationDirections
::
MX
,
procID
-
1
);
}
if
(
isFirstSubDomain
)
{
if
(
isFirstSubDomain
&&
!
readPrecursor
)
{
gridBuilder
->
findCommunicationIndices
(
CommunicationDirections
::
MX
,
lbmOrGks
);
gridBuilder
->
setCommunicationProcess
(
CommunicationDirections
::
MX
,
nProcs
-
1
);
}
if
(
isLastSubDomain
)
{
if
(
isLastSubDomain
&&
!
readPrecursor
)
{
gridBuilder
->
findCommunicationIndices
(
CommunicationDirections
::
PX
,
lbmOrGks
);
gridBuilder
->
setCommunicationProcess
(
CommunicationDirections
::
PX
,
0
);
}
...
...
@@ -299,30 +296,23 @@ void multipleLevel(const std::string& configPath)
if
(
readPrecursor
)
{
auto
precursor
=
createFileCollection
(
precursorDirectory
+
"/precursor"
,
FileType
::
VTK
);
gridBuilder
->
setPrecursorBoundaryCondition
(
SideType
::
MX
,
precursor
,
nTReadPrecursor
);
gridBuilder
->
setStressBoundaryCondition
(
SideType
::
MZ
,
0.0
,
0.0
,
1.0
,
// wall normals
samplingOffset
,
z0
/
dx
);
// wall model settinng
para
->
setHasWallModelMonitor
(
true
);
gridBuilder
->
setSlipBoundaryCondition
(
SideType
::
PZ
,
0.0
f
,
0.0
f
,
-
1.0
f
);
if
(
isFirstSubDomain
)
{
auto
precursor
=
createFileCollection
(
precursorDirectory
+
"/precursor"
,
FileType
::
VTK
);
gridBuilder
->
setPrecursorBoundaryCondition
(
SideType
::
MX
,
precursor
,
nTReadPrecursor
);
}
gridBuilder
->
setPressureBoundaryCondition
(
SideType
::
PX
,
0.
f
);
if
(
isLastSubDomain
)
{
gridBuilder
->
setPressureBoundaryCondition
(
SideType
::
PX
,
0.
f
);
}
}
else
{
gridBuilder
->
setSlipBoundaryCondition
(
SideType
::
PZ
,
0.0
,
0.0
,
-
1.0
);
gridBuilder
->
setStressBoundaryCondition
(
SideType
::
MZ
,
gridBuilder
->
setStressBoundaryCondition
(
SideType
::
MZ
,
0.0
,
0.0
,
1.0
,
// wall normals
samplingOffset
,
z0
/
dx
);
// wall model settinng
para
->
setHasWallModelMonitor
(
true
);
}
para
->
setHasWallModelMonitor
(
true
);
gridBuilder
->
setSlipBoundaryCondition
(
SideType
::
PZ
,
0.0
f
,
0.0
f
,
-
1.0
f
);
bcFactory
.
setStressBoundaryCondition
(
BoundaryConditionFactory
::
StressBC
::
StressPressureBounceBack
);
bcFactory
.
setSlipBoundaryCondition
(
BoundaryConditionFactory
::
SlipBC
::
SlipBounceBack
);
...
...
@@ -330,8 +320,6 @@ void multipleLevel(const std::string& configPath)
bcFactory
.
setPrecursorBoundaryCondition
(
useDistributions
?
BoundaryConditionFactory
::
PrecursorBC
::
DistributionsPrecursor
:
BoundaryConditionFactory
::
PrecursorBC
::
VelocityPrecursor
);
para
->
setOutflowPressureCorrectionFactor
(
0.0
);
para
->
setInitialCondition
([
&
](
real
coordX
,
real
coordY
,
real
coordZ
,
real
&
rho
,
real
&
vx
,
real
&
vy
,
real
&
vz
)
{
rho
=
(
real
)
0.0
;
vx
=
rho
=
c0o1
;
...
...
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