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
6a0113a6
Commit
6a0113a6
authored
7 months ago
by
Martin Schönherr
Browse files
Options
Downloads
Patches
Plain Diff
add laminarPipeFlow and laminarPlaneFlow Apps
parent
30fb46f7
No related branches found
No related tags found
1 merge request
!447
Refactoring the namespaces
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
apps/cpu/LaminarPipeFlow/LaminarPipeFlow.cpp
+10
-10
10 additions, 10 deletions
apps/cpu/LaminarPipeFlow/LaminarPipeFlow.cpp
apps/cpu/LaminarPlaneFlow/LaminarPlaneFlow.cpp
+8
-8
8 additions, 8 deletions
apps/cpu/LaminarPlaneFlow/LaminarPlaneFlow.cpp
with
18 additions
and
18 deletions
apps/cpu/LaminarPipeFlow/LaminarPipeFlow.cpp
+
10
−
10
View file @
6a0113a6
...
...
@@ -132,11 +132,11 @@ void run(const vf::basics::ConfigurationFile& config)
real
g_maxX3
=
length
[
2
]
/
2.0
;
SPtr
<
GbObject3D
>
cylinder
(
new
GbCylinder3D
(
g_minX1
-
2.0
*
dx
,
0.0
,
0.0
,
g_maxX1
+
2.0
*
dx
,
0.0
,
0.0
,
dLB
/
2.0
));
GbS
ystem
3D
::
writeGeoObject
(
cylinder
.
get
(),
pathname
+
"/geo/cylinder"
,
WbWriterVtkXmlBinary
::
getInstance
());
gb_s
ystem
_3d
::
writeGeoObject
(
cylinder
.
get
(),
pathname
+
"/geo/cylinder"
,
WbWriterVtkXmlBinary
::
getInstance
());
SPtr
<
GbObject3D
>
gridCube
(
new
GbCuboid3D
(
g_minX1
,
g_minX2
,
g_minX3
,
g_maxX1
,
g_maxX2
,
g_maxX3
));
if
(
myid
==
0
)
GbS
ystem
3D
::
writeGeoObject
(
gridCube
.
get
(),
pathname
+
"/geo/gridCube"
,
WbWriterVtkXmlBinary
::
getInstance
());
gb_s
ystem
_3d
::
writeGeoObject
(
gridCube
.
get
(),
pathname
+
"/geo/gridCube"
,
WbWriterVtkXmlBinary
::
getInstance
());
real
blockLength
=
3.
*
dx
;
...
...
@@ -147,29 +147,29 @@ void run(const vf::basics::ConfigurationFile& config)
grid
->
setPeriodicX3
(
false
);
if
(
myid
==
0
)
GbS
ystem
3D
::
writeGeoObject
(
gridCube
.
get
(),
pathname
+
"/geo/gridCube"
,
WbWriterVtkXmlBinary
::
getInstance
());
gb_s
ystem
_3d
::
writeGeoObject
(
gridCube
.
get
(),
pathname
+
"/geo/gridCube"
,
WbWriterVtkXmlBinary
::
getInstance
());
GenBlocksGridVisitor
genBlocks
(
gridCube
);
grid
->
accept
(
genBlocks
);
SPtr
<
GbObject3D
>
refineCube1_1
(
new
GbCuboid3D
(
g_minX1
,
g_minX2
,
g_minX3
,
g_maxX1
,
g_minX2
+
blockLength
,
g_maxX3
));
if
(
myid
==
0
)
GbS
ystem
3D
::
writeGeoObject
(
refineCube1_1
.
get
(),
pathname
+
"/geo/refineCube1_1"
,
gb_s
ystem
_3d
::
writeGeoObject
(
refineCube1_1
.
get
(),
pathname
+
"/geo/refineCube1_1"
,
WbWriterVtkXmlBinary
::
getInstance
());
SPtr
<
GbObject3D
>
refineCube1_2
(
new
GbCuboid3D
(
g_minX1
,
g_maxX2
-
blockLength
,
g_minX3
,
g_maxX1
,
g_maxX2
,
g_maxX3
));
if
(
myid
==
0
)
GbS
ystem
3D
::
writeGeoObject
(
refineCube1_2
.
get
(),
pathname
+
"/geo/refineCube1_2"
,
gb_s
ystem
_3d
::
writeGeoObject
(
refineCube1_2
.
get
(),
pathname
+
"/geo/refineCube1_2"
,
WbWriterVtkXmlBinary
::
getInstance
());
SPtr
<
GbObject3D
>
refineCube1_3
(
new
GbCuboid3D
(
g_minX1
,
g_minX2
,
g_minX3
,
g_maxX1
,
g_maxX2
,
g_minX3
+
blockLength
));
if
(
myid
==
0
)
GbS
ystem
3D
::
writeGeoObject
(
refineCube1_3
.
get
(),
pathname
+
"/geo/refineCube1_3"
,
gb_s
ystem
_3d
::
writeGeoObject
(
refineCube1_3
.
get
(),
pathname
+
"/geo/refineCube1_3"
,
WbWriterVtkXmlBinary
::
getInstance
());
SPtr
<
GbObject3D
>
refineCube1_4
(
new
GbCuboid3D
(
g_minX1
,
g_minX2
,
g_maxX3
-
blockLength
,
g_maxX1
,
g_maxX2
,
g_maxX3
));
if
(
myid
==
0
)
GbS
ystem
3D
::
writeGeoObject
(
refineCube1_4
.
get
(),
pathname
+
"/geo/refineCube1_4"
,
gb_s
ystem
_3d
::
writeGeoObject
(
refineCube1_4
.
get
(),
pathname
+
"/geo/refineCube1_4"
,
WbWriterVtkXmlBinary
::
getInstance
());
if
(
refineLevel
>
0
)
{
...
...
@@ -189,13 +189,13 @@ void run(const vf::basics::ConfigurationFile& config)
GbCuboid3DPtr
geoInflow
(
new
GbCuboid3D
(
g_minX1
-
blockLength
,
g_minX2
-
blockLength
,
g_minX3
-
blockLength
,
g_minX1
,
g_maxX2
+
blockLength
,
g_maxX3
+
blockLength
));
if
(
myid
==
0
)
GbS
ystem
3D
::
writeGeoObject
(
geoInflow
.
get
(),
pathname
+
"/geo/geoInflow"
,
WbWriterVtkXmlASCII
::
getInstance
());
gb_s
ystem
_3d
::
writeGeoObject
(
geoInflow
.
get
(),
pathname
+
"/geo/geoInflow"
,
WbWriterVtkXmlASCII
::
getInstance
());
// outflow
GbCuboid3DPtr
geoOutflow
(
new
GbCuboid3D
(
g_maxX1
,
g_minX2
-
blockLength
,
g_minX3
-
blockLength
,
g_maxX1
+
blockLength
,
g_maxX2
+
blockLength
,
g_maxX3
+
blockLength
));
if
(
myid
==
0
)
GbS
ystem
3D
::
writeGeoObject
(
geoOutflow
.
get
(),
pathname
+
"/geo/geoOutflow"
,
WbWriterVtkXmlASCII
::
getInstance
());
gb_s
ystem
_3d
::
writeGeoObject
(
geoOutflow
.
get
(),
pathname
+
"/geo/geoOutflow"
,
WbWriterVtkXmlASCII
::
getInstance
());
SPtr
<
D3Q27Interactor
>
cylinderInt
(
new
D3Q27Interactor
(
cylinder
,
grid
,
noSlipBC
,
Interactor3D
::
INVERSESOLID
));
...
...
@@ -221,7 +221,7 @@ void run(const vf::basics::ConfigurationFile& config)
ppblocks
.
reset
();
if
(
myid
==
0
)
VF_LOG_INFO
(
"{}"
,
U
tilities
::
toString
(
grid
,
comm
->
getNumberOfProcesses
()));
VF_LOG_INFO
(
"{}"
,
u
tilities
::
toString
(
grid
,
comm
->
getNumberOfProcesses
()));
SetKernelBlockVisitor
kernelVisitor
(
kernel
,
nuLB
,
comm
->
getNumberOfProcesses
());
grid
->
accept
(
kernelVisitor
);
...
...
This diff is collapsed.
Click to expand it.
apps/cpu/LaminarPlaneFlow/LaminarPlaneFlow.cpp
+
8
−
8
View file @
6a0113a6
...
...
@@ -104,19 +104,19 @@ void run(const vf::basics::ConfigurationFile& config)
SPtr
<
GbObject3D
>
gridCube
(
new
GbCuboid3D
(
g_minX1
,
g_minX2
,
g_minX3
,
g_maxX1
,
g_maxX2
,
g_maxX3
));
if
(
myid
==
0
)
GbS
ystem
3D
::
writeGeoObject
(
gridCube
.
get
(),
pathname
+
"/geo/gridCube"
,
WbWriterVtkXmlBinary
::
getInstance
());
gb_s
ystem
_3d
::
writeGeoObject
(
gridCube
.
get
(),
pathname
+
"/geo/gridCube"
,
WbWriterVtkXmlBinary
::
getInstance
());
real
k1
=
4
;
SPtr
<
GbObject3D
>
refineCube1_1
(
new
GbCuboid3D
(
g_minX1
,
g_minX2
,
g_minX3
,
g_maxX1
,
g_maxX2
/
k1
-
1.0
,
g_maxX3
));
if
(
myid
==
0
)
GbS
ystem
3D
::
writeGeoObject
(
refineCube1_1
.
get
(),
pathname
+
"/geo/refineCube1_1"
,
gb_s
ystem
_3d
::
writeGeoObject
(
refineCube1_1
.
get
(),
pathname
+
"/geo/refineCube1_1"
,
WbWriterVtkXmlBinary
::
getInstance
());
SPtr
<
GbObject3D
>
refineCube1_2
(
new
GbCuboid3D
(
g_minX1
,
g_maxX2
-
g_maxX2
/
k1
+
1.0
,
g_minX3
,
g_maxX1
,
g_maxX2
,
g_maxX3
));
if
(
myid
==
0
)
GbS
ystem
3D
::
writeGeoObject
(
refineCube1_2
.
get
(),
pathname
+
"/geo/refineCube1_2"
,
gb_s
ystem
_3d
::
writeGeoObject
(
refineCube1_2
.
get
(),
pathname
+
"/geo/refineCube1_2"
,
WbWriterVtkXmlBinary
::
getInstance
());
SPtr
<
LBMKernel
>
kernel
;
...
...
@@ -159,24 +159,24 @@ void run(const vf::basics::ConfigurationFile& config)
GbCuboid3DPtr
addWallYmin
(
new
GbCuboid3D
(
g_minX1
-
blockLength
,
g_minX2
-
blockLength
,
g_minX3
-
blockLength
,
g_maxX1
+
blockLength
,
g_minX2
,
g_maxX3
+
blockLength
));
if
(
myid
==
0
)
GbS
ystem
3D
::
writeGeoObject
(
addWallYmin
.
get
(),
pathname
+
"/geo/addWallYmin"
,
WbWriterVtkXmlASCII
::
getInstance
());
gb_s
ystem
_3d
::
writeGeoObject
(
addWallYmin
.
get
(),
pathname
+
"/geo/addWallYmin"
,
WbWriterVtkXmlASCII
::
getInstance
());
GbCuboid3DPtr
addWallYmax
(
new
GbCuboid3D
(
g_minX1
-
blockLength
,
g_maxX2
,
g_minX3
-
blockLength
,
g_maxX1
+
blockLength
,
g_maxX2
+
blockLength
,
g_maxX3
+
blockLength
));
if
(
myid
==
0
)
GbS
ystem
3D
::
writeGeoObject
(
addWallYmax
.
get
(),
pathname
+
"/geo/addWallYmax"
,
WbWriterVtkXmlASCII
::
getInstance
());
gb_s
ystem
_3d
::
writeGeoObject
(
addWallYmax
.
get
(),
pathname
+
"/geo/addWallYmax"
,
WbWriterVtkXmlASCII
::
getInstance
());
// inflow
GbCuboid3DPtr
geoInflow
(
new
GbCuboid3D
(
g_minX1
-
blockLength
,
g_minX2
-
blockLength
,
g_minX3
-
blockLength
,
g_minX1
,
g_maxX2
+
blockLength
,
g_maxX3
+
blockLength
));
if
(
myid
==
0
)
GbS
ystem
3D
::
writeGeoObject
(
geoInflow
.
get
(),
pathname
+
"/geo/geoInflow"
,
WbWriterVtkXmlASCII
::
getInstance
());
gb_s
ystem
_3d
::
writeGeoObject
(
geoInflow
.
get
(),
pathname
+
"/geo/geoInflow"
,
WbWriterVtkXmlASCII
::
getInstance
());
// outflow
GbCuboid3DPtr
geoOutflow
(
new
GbCuboid3D
(
g_maxX1
,
g_minX2
-
blockLength
,
g_minX3
-
blockLength
,
g_maxX1
+
blockLength
,
g_maxX2
+
blockLength
,
g_maxX3
+
blockLength
));
if
(
myid
==
0
)
GbS
ystem
3D
::
writeGeoObject
(
geoOutflow
.
get
(),
pathname
+
"/geo/geoOutflow"
,
WbWriterVtkXmlASCII
::
getInstance
());
gb_s
ystem
_3d
::
writeGeoObject
(
geoOutflow
.
get
(),
pathname
+
"/geo/geoOutflow"
,
WbWriterVtkXmlASCII
::
getInstance
());
SPtr
<
SimulationObserver
>
ppblocks
(
new
WriteBlocksSimulationObserver
(
grid
,
SPtr
<
UbScheduler
>
(
new
UbScheduler
(
1
)),
pathname
,
WbWriterVtkXmlBinary
::
getInstance
(),
comm
));
...
...
@@ -232,7 +232,7 @@ void run(const vf::basics::ConfigurationFile& config)
ppblocks
.
reset
();
if
(
myid
==
0
)
VF_LOG_INFO
(
"{}"
,
U
tilities
::
toString
(
grid
,
comm
->
getNumberOfProcesses
()));
VF_LOG_INFO
(
"{}"
,
u
tilities
::
toString
(
grid
,
comm
->
getNumberOfProcesses
()));
SetKernelBlockVisitor
kernelVisitor
(
kernel
,
nu
);
grid
->
accept
(
kernelVisitor
);
...
...
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