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
b3d735e0
Commit
b3d735e0
authored
6 years ago
by
Shina Maini
Browse files
Options
Downloads
Patches
Plain Diff
fix refinement setup
parent
761d925a
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
source/Applications/OrganPipe/OrganPipe.cpp
+10
-23
10 additions, 23 deletions
source/Applications/OrganPipe/OrganPipe.cpp
with
10 additions
and
23 deletions
source/Applications/OrganPipe/OrganPipe.cpp
+
10
−
23
View file @
b3d735e0
...
...
@@ -56,7 +56,7 @@ void run()
double
g_maxX1
=
4.096
+
offs1
;
double
g_maxX2
=
2.048
;
double
g_maxX3
=
2.048
;
double
radius_inlet
=
0.0
12
;
double
radius_inlet
=
0.0
06
;
if
(
myid
==
0
)
{
...
...
@@ -108,37 +108,23 @@ void run()
SPtr
<
GbObject3D
>
gridCube
(
new
GbCuboid3D
(
g_minX1
,
g_minX2
,
g_minX3
,
g_maxX1
,
g_maxX2
,
g_maxX3
));
if
(
myid
==
0
)
GbSystem3D
::
writeGeoObject
(
gridCube
.
get
(),
pathOut
+
"/geo/gridCube"
,
WbWriterVtkXmlBinary
::
getInstance
());
GenBlocksGridVisitor
genBlocks
(
gridCube
);
SPtr
<
GbObject3D
>
gridCylinder
(
new
GbCylinder3D
(
-
0.1317
,
-
radius_inlet
,
-
radius_inlet
,
-
0.1107
,
+
radius_inlet
,
+
radius_inlet
,
radius_inlet
));
GenBlocksGridVisitor
genBlocks
(
gridCylinder
);
grid
->
accept
(
genBlocks
);
////create pseudo pipe
double
offset1
=
30e-3
;
//GbCuboid3DPtr pipe(new GbCuboid3D(g_minX1, g_maxX2*0.5 - offset1, g_maxX3*0.5 - offset1, 270e-3, g_maxX2*0.5 + offset1, g_maxX3*0.5 + offset1));
//if (myid == 0) GbSystem3D::writeGeoObject(pipe.get(), pathOut + "/geo/pipe", WbWriterVtkXmlASCII::getInstance());
//////////////////////////////////////////////////////////////////////////
//refinement
double
blockLengthX3Fine
=
grid
->
getDeltaX
(
refineLevel
)
*
blocknx
[
2
];
//double refHight = 0.002;
//GbCuboid3DPtr refineBoxTop(new GbCuboid3D(g_minX1 - blockLength, g_minX2 - blockLength, g_maxX3 - refHight, g_maxX1 + blockLength, g_maxX2 + blockLength, g_maxX3));
//if (myid == 0) GbSystem3D::writeGeoObject(refineBoxTop.get(), pathOut + "/geo/refineBoxTop", WbWriterVtkXmlASCII::getInstance());
////GbCuboid3DPtr refineBoxBottom(new GbCuboid3D(g_minX1-blockLength, g_minX2-blockLength, g_minX3, g_maxX1+blockLength, g_maxX2+blockLength, g_minX3+offsetMinX3+blockLengthX3Fine));
//GbCuboid3DPtr refineBoxBottom(new GbCuboid3D(g_minX1 - blockLength, g_minX2 - blockLength, g_minX3, g_maxX1 + blockLength, g_maxX2 + blockLength, g_minX3 + refHight));
//if (myid == 0) GbSystem3D::writeGeoObject(refineBoxBottom.get(), pathOut + "/geo/refineBoxBottom", WbWriterVtkXmlASCII::getInstance());
SPtr
<
GbSphere3D
>
refineSphereL5
(
new
GbSphere3D
(
g_minX1
,
0.0
,
0.0
,
3.0
*
L
));
if
(
myid
==
0
)
GbSystem3D
::
writeGeoObject
(
refineSphereL5
.
get
(),
pathOut
+
"/geo/refineSphereL5"
,
WbWriterVtkXmlASCII
::
getInstance
());
//full pipe refine
SPtr
<
GbObject3D
>
refineBoxL7
(
new
GbCuboid3D
(
-
0.1107
,
-
0.0165
,
-
0.0165
,
0.1317
,
0.0165
,
0.0165
));
if
(
myid
==
0
)
GbSystem3D
::
writeGeoObject
(
refineBoxL7
.
get
(),
pathOut
+
"/geo/refBoxL7"
,
WbWriterVtkXmlASCII
::
getInstance
());
if
(
myid
==
0
)
GbSystem3D
::
writeGeoObject
(
refineBoxL7
.
get
(),
pathOut
+
"/geo/ref
ine
BoxL7"
,
WbWriterVtkXmlASCII
::
getInstance
());
//refine languid and upperlip
SPtr
<
GbObject3D
>
refineBoxL9
(
new
GbCuboid3D
(
-
0.1007
,
-
0.0165
,
-
0.0165
,
-
0.0627
,
0.0165
,
0.0165
));
if
(
myid
==
0
)
GbSystem3D
::
writeGeoObject
(
refineBoxL9
.
get
(),
pathOut
+
"/geo/refBoxL
7
"
,
WbWriterVtkXmlASCII
::
getInstance
());
if
(
myid
==
0
)
GbSystem3D
::
writeGeoObject
(
refineBoxL9
.
get
(),
pathOut
+
"/geo/ref
ine
BoxL
9
"
,
WbWriterVtkXmlASCII
::
getInstance
());
SPtr
<
GbSphere3D
>
refineSphereL9
(
new
GbSphere3D
(
g_minX1
+
7
6
e-3
,
0.0
,
g_minX3
+
15e-3
,
24e-3
));
SPtr
<
GbSphere3D
>
refineSphereL9
(
new
GbSphere3D
(
g_minX1
+
7
5
e-3
,
0.0
,
0.015
,
24e-3
));
if
(
myid
==
0
)
GbSystem3D
::
writeGeoObject
(
refineSphereL9
.
get
(),
pathOut
+
"/geo/refineSphereL9"
,
WbWriterVtkXmlASCII
::
getInstance
());
if
(
refineLevel
>
0
)
...
...
@@ -164,9 +150,9 @@ void run()
//walls
GbCuboid3DPtr
addWallYmin
(
new
GbCuboid3D
(
g_minX1
-
0.001
,
g_minX2
-
0.001
,
g_minX3
-
0.001
,
g_maxX1
+
0.001
,
g_minX2
,
g_maxX3
+
0.001
));
if
(
myid
==
0
)
GbSystem3D
::
writeGeoObject
(
addWallYmin
.
get
(),
pathOut
+
"/geo/addWall
Z
min"
,
WbWriterVtkXmlASCII
::
getInstance
());
if
(
myid
==
0
)
GbSystem3D
::
writeGeoObject
(
addWallYmin
.
get
(),
pathOut
+
"/geo/addWall
Y
min"
,
WbWriterVtkXmlASCII
::
getInstance
());
GbCuboid3DPtr
addWallYmax
(
new
GbCuboid3D
(
g_minX1
-
0.001
,
g_maxX2
,
g_minX3
-
0.001
,
g_maxX1
+
0.001
,
g_maxX2
+
0.001
,
g_maxX3
+
0.001
));
if
(
myid
==
0
)
GbSystem3D
::
writeGeoObject
(
addWallYm
in
.
get
(),
pathOut
+
"/geo/addWall
Zmin
"
,
WbWriterVtkXmlASCII
::
getInstance
());
if
(
myid
==
0
)
GbSystem3D
::
writeGeoObject
(
addWallYm
ax
.
get
(),
pathOut
+
"/geo/addWall
Ymax
"
,
WbWriterVtkXmlASCII
::
getInstance
());
GbCuboid3DPtr
addWallZmin
(
new
GbCuboid3D
(
g_minX1
-
0.001
,
g_minX2
-
0.001
,
g_minX3
-
0.001
,
g_maxX1
+
0.001
,
g_maxX2
+
0.001
,
g_minX3
));
if
(
myid
==
0
)
GbSystem3D
::
writeGeoObject
(
addWallZmin
.
get
(),
pathOut
+
"/geo/addWallZmin"
,
WbWriterVtkXmlASCII
::
getInstance
());
GbCuboid3DPtr
addWallZmax
(
new
GbCuboid3D
(
g_minX1
-
0.001
,
g_minX2
-
0.001
,
g_maxX3
,
g_maxX1
+
0.001
,
g_maxX2
+
0.001
,
g_maxX3
+
0.001
));
...
...
@@ -179,15 +165,16 @@ void run()
SPtr
<
D3Q27Interactor
>
addWallZmaxInt
(
new
D3Q27Interactor
(
addWallZmax
,
grid
,
velBCAdapter
,
Interactor3D
::
SOLID
));
//inflow
GbCylinder3DPtr
geoInflow
(
new
GbCylinder3D
(
g_minX1
-
0.001
,
-
radius_inlet
-
0.001
,
-
radius_inlet
-
0.0
01
,
g_minX1
+
0.001
,
radius_inlet
+
0.001
,
radius_inlet
+
0.0
01
,
radius_inlet
));
GbCylinder3DPtr
geoInflow
(
new
GbCylinder3D
(
g_minX1
-
deltaXcoarse
,
0.0
,
0.0
,
g_minX1
+
deltaXcoarse
,
0.0
,
0.0
,
radius_inlet
));
if
(
myid
==
0
)
GbSystem3D
::
writeGeoObject
(
geoInflow
.
get
(),
pathOut
+
"/geo/geoInflow"
,
WbWriterVtkXmlASCII
::
getInstance
());
//outflow
GbCuboid3DPtr
geoOutflow
(
new
GbCuboid3D
(
g_maxX1
,
g_minX2
-
0.001
,
g_minX3
-
0.001
,
g_maxX1
+
0.001
,
g_maxX2
+
0.001
,
g_maxX3
+
0.001
));
GbCuboid3DPtr
geoOutflow
(
new
GbCuboid3D
(
g_maxX1
,
g_minX2
-
deltaXcoarse
,
g_minX3
-
deltaXcoarse
,
g_maxX1
+
deltaXcoarse
,
g_maxX2
+
deltaXcoarse
,
g_maxX3
+
deltaXcoarse
));
if
(
myid
==
0
)
GbSystem3D
::
writeGeoObject
(
geoOutflow
.
get
(),
pathOut
+
"/geo/geoOutflow"
,
WbWriterVtkXmlASCII
::
getInstance
());
//inflow
SPtr
<
D3Q27Interactor
>
inflowIntr
=
SPtr
<
D3Q27Interactor
>
(
new
D3Q27Interactor
(
geoInflow
,
grid
,
velBCAdapter
,
Interactor3D
::
SOLID
));
//outflow
SPtr
<
D3Q27Interactor
>
outflowIntr
=
SPtr
<
D3Q27Interactor
>
(
new
D3Q27Interactor
(
geoOutflow
,
grid
,
outflowBCAdapter
,
Interactor3D
::
SOLID
));
}
//////////////////////////////////////////////////////////////////////////
...
...
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