Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
fluidparticles
MigFlow
Commits
3aa1bb9a
Commit
3aa1bb9a
authored
Nov 06, 2018
by
Jonathan Lambrechts
Browse files
validation
parent
45cb5578
Pipeline
#4533
failed with stage
in 20 seconds
Changes
8
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
.gitlab-ci.yml
View file @
3aa1bb9a
...
...
@@ -25,6 +25,7 @@ mbtests :
-
mkdir build
-
cd build/
-
cmake .. -DENABLE_PETSC=1 -DPETSC_DIR=/usr/lib/petscdir/petsc3.9/ -DPETSC_ARCH=x86_64-linux-gnu-real
-
PPATH=$(pwd)
-
make -j4
-
cd ../validation
-
../build/migflow.sh
mbtests.py
-
PYTHONPATH=$PPATH:$PYTHONPATH python3
mbtests.py
cmake/FindPETSc.cmake
View file @
3aa1bb9a
...
...
@@ -70,17 +70,15 @@ if(PETSC_VARIABLES)
${
PETSC_PACKAGES_INCLUDES
}
)
endif
(
PETSC_PACKAGES_INCLUDES
)
if
(
PETSC_PACKAGES_INCLUDES
)
if
(
PETSC_PACKAGES_INCLUDES
)
string
(
REPLACE
"-I"
""
PETSC_PACKAGES_INCLUDES
${
PETSC_PACKAGES_INCLUDES
}
)
string
(
REPLACE
" "
";"
PETSC_PACKAGES_INCLUDES
${
PETSC_PACKAGES_INCLUDES
}
)
foreach
(
VAR
${
PETSC_PACKAGES_INCLUDES
}
)
# seem to include unexisting directories (/usr/include/lib64)
# check to avoid warnings
if
(
EXISTS
${
VAR
}
)
list
(
APPEND PETSC_INC
${
VAR
}
)
# check to avoid warnings
if
(
EXISTS
${
VAR
}
)
list
(
APPEND PETSC_INC
${
VAR
}
)
endif
(
EXISTS
${
VAR
}
)
endforeach
(
VAR
)
endif
(
PETSC_PACKAGES_INCLUDES
)
endif
(
PETSC_PACKAGES_INCLUDES
)
string
(
REGEX MATCHALL
"
\n
CC = [^
\n\r
]*"
PETSC_CC
${
PETSC_VARIABLES
}
)
if
(
PETSC_CC
)
...
...
validation/cavity/cavity.py
View file @
3aa1bb9a
...
...
@@ -21,7 +21,6 @@
#!/usr/bin/env python
from
migflow
import
fluid
as
mbfluid
from
migflow
import
scontact2
import
numpy
as
np
import
os
...
...
@@ -69,7 +68,7 @@ class Poiseuille(unittest.TestCase) :
#Object fluid creation + Boundary condition of the fluid (field 0 is horizontal velocity; field 1 is vertical velocity; field 2 is pressure)
#Format: strong_boundaries = [(Boundary tag, Fluid field, Value)
fluid
=
mbfluid
.
f
luid
_p
roblem
(
g
,
nu
*
rho
,
rho
)
fluid
=
mbfluid
.
F
luid
P
roblem
(
2
,
g
,
nu
*
rho
,
rho
)
fluid
.
load_msh
(
"mesh.msh"
)
fluid
.
set_strong_boundary
(
"Top"
,
0
,
vUp
)
fluid
.
set_strong_boundary
(
"Top"
,
1
,
0.
)
...
...
validation/cavity/mesh.geo
View file @
3aa1bb9a
...
...
@@ -21,3 +21,4 @@ Physical Line("Bottom") = {2};
Physical Line("Top") = {4};
Physical Surface("Domain") = {1};
Physical Point("PtFix") = {2};
Mesh.MshFileVersion = 2;
validation/oneGrain/mesh.geo
View file @
3aa1bb9a
...
...
@@ -20,3 +20,4 @@ Physical Line("Top") = {4};
Physical Line("Lateral") = {1,3};
Physical Surface("Domain") = {1};
Physical Point("PtFix") = {1};
Mesh.MshFileVersion = 2;
validation/oneGrain/oneGrain.py
View file @
3aa1bb9a
...
...
@@ -21,7 +21,7 @@
#!/usr/bin/env python
from
migflow
import
fluid
as
mbfluid
from
migflow
import
scontact
2
from
migflow
import
scontact
import
numpy
as
np
import
os
...
...
@@ -64,11 +64,11 @@ class Poiseuille(unittest.TestCase) :
dt
=
.
01
# time step
shutil
.
copy
(
"mesh.msh"
,
outputdir
+
"/mesh.msh"
)
p
=
scontact
2
.
ParticleProblem
()
p
=
scontact
.
ParticleProblem
(
2
)
p
.
load_msh_boundaries
(
"mesh.msh"
,
[
"Top"
,
"Bottom"
,
"Lateral"
])
p
.
add_particle
((
0
,
4.5
),
r
,
r
**
2
*
np
.
pi
*
rhop
)
p
.
write_vtk
(
outputdir
,
0
,
0
)
p
=
scontact
2
.
ParticleProblem
()
p
=
scontact
.
ParticleProblem
(
2
)
p
.
read_vtk
(
"output"
,
0
)
p
.
write_vtk
(
outputdir
,
0
,
0
)
print
(
"r = %g, m = %g
\n
"
%
(
p
.
r
()[
0
],
p
.
mass
()[
0
]))
...
...
@@ -76,7 +76,7 @@ class Poiseuille(unittest.TestCase) :
outf
=
1
# number of iterations between output files
fluid
=
mbfluid
.
f
luid
_p
roblem
(
g
,
nu
*
rho
,
rho
)
fluid
=
mbfluid
.
F
luid
P
roblem
(
2
,
g
,
nu
*
rho
,
rho
)
fluid
.
load_msh
(
"mesh.msh"
)
fluid
.
set_strong_boundary
(
"Top"
,
2
,
0.
)
fluid
.
set_weak_boundary
(
"Bottom"
,
"Wall"
)
...
...
validation/poiseuille/mesh.geo
View file @
3aa1bb9a
...
...
@@ -27,3 +27,4 @@ Physical Line("Bottom") = {3};
Physical Line("Top") = {6};
Physical Surface("Domain") = {1};
Physical Point("PtFix") = {1};
Mesh.MshFileVersion = 2;
validation/poiseuille/poiseuille.py
View file @
3aa1bb9a
...
...
@@ -21,7 +21,6 @@
#!/usr/bin/env python
from
migflow
import
fluid
as
mbfluid
from
migflow
import
scontact2
import
numpy
as
np
import
os
...
...
@@ -65,7 +64,7 @@ class Poiseuille(unittest.TestCase) :
outf
=
1
# number of iterations between output files
#Object fluid creation + Boundary condition of the fluid (field 0 is horizontal velocity; field 1 is vertical velocity; field 2 is pressure)
fluid
=
mbfluid
.
f
luid
_p
roblem
(
g
,
nu
*
rho
,
rho
)
fluid
=
mbfluid
.
F
luid
P
roblem
(
2
,
g
,
nu
*
rho
,
rho
)
fluid
.
set_strong_boundary
(
"RightUp"
,
2
,
0.
)
fluid
.
set_strong_boundary
(
"RightDown"
,
2
,
0.
)
fluid
.
set_strong_boundary
(
"Top"
,
0
,
0
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment