Professional Documents
Culture Documents
December 2013
A.J.C. Crespo (alexbexe@uvigo.es)
J.M. Domnguez (jmdominguez@uvigo.es)
M.G. Gesteira (mggesteira@uvigo.es)
A. Barreiro (anxo.barreiro@uvigo.es)
B.D. Rogers (benedict.rogers@manchester.ac.uk)
1
IPART ( ascii)
Case.txt
SPHysicsGen
SPHysics
INDAT
Case.bin
(binary)
Case_Def.xml
Definition
GenCase
Case.xml
DualSPHysics
Definition
Execution
casedef :
- constantsdef constants needed in SPH
- mkconfig
configuration of labels
- geometry
geometry of the system (boundaries and fluid)
- definition
- commands (list & mainlist)
- initials
special features for fluid particles
- floatings
description of floating objects
- motion
description of the movement of boundaries
execution
- parameters parameters of execution in DualSPHysics
CASEDEF-CONSTANTSDEF
lattice: indicates the type of mesh to create particles
1: one particle per point
2: two particles per point
Points
Particles (lattice= 1)
Particles (lattice=2)
CASEDEF-MKCONFIG
mk: label used to
- define the order of creation of the objects
- apply specific features to the different set of
points such as movement, rigid motion
240 labels for boundary particles and
10 labes for fluid particles
mkorientfluid = xyz
mkorientfluid = xyz
mkorientfluid = yzX
mkorientfluid = ZYx
CASEDEF-GEOMETRY-DEFINITION
pointmin
CASEDEF-GEOMETRY-DEFINITION
CASEDEF-GEOMETRY-COMMANDS-MAINLIST
wire
face
<setdrawmode>:
wire: wire mode
face: draw faces
solid: draw inside
full: combines face and solid
solid
full
10
CASEDEF-GEOMETRY-COMMANDS-MAINLIST
11
CASEDEF-GEOMETRY-COMMANDS-MAINLIST
<setshapemode>: defines the draw operations to create a VTK files (polygons)
reset=true indicates that you will create a new VTK with shapeout
including objects created starting from this line
12
CASEDEF-GEOMETRY-COMMANDS-MAINLIST
13
CASEDEF-GEOMETRY-COMMANDS-MAINLIST
CASEDEF-GEOMETRY-COMMANDS-MAINLIST
<drawbox >
CASEDEF-GEOMETRY-COMMANDS-MAINLIST
16
CASEDEF-GEOMETRY-COMMANDS-MAINLIST
17
CASEDEF-GEOMETRY-COMMANDS-MAINLIST
1
3
18
CASEDEF-GEOMETRY-COMMANDS-MAINLIST
4
5
1
5
6
0
7
3
8
2
9
1/10
19
CASEDEF-GEOMETRY-COMMANDS-MAINLIST
7
6
4
5
3
20
CASEDEF-GEOMETRY-COMMANDS-MAINLIST
DrawFigure
(drawmode=solid)
DrawTriangles or
DrawFigure (drawmode=face)
21
CASEDEF-GEOMETRY-COMMANDS-MAINLIST
Pyramid1
(mask=0)
Pyramid2
(mask=2=0..010)
22
CASEDEF-GEOMETRY-COMMANDS-MAINLIST
Prism1 (mask=0)
Prism2 (mask=2=0..010)
23
CASEDEF-GEOMETRY-COMMANDS-MAINLIST
24
CASEDEF-GEOMETRY-COMMANDS-MAINLIST
25
CASEDEF-GEOMETRY-COMMANDS-MAINLIST
EXAMPLE: CaseWavemaker_Def.xml
2
7
4
6
1
5
3
4
5
mask in <drawprism> are the faces to be hidden
and can be also defined using the index of the faces instead of bits
In this example, faces 1, 2, 6 and 7 are not created, only 3,4 and 5.
26
CASEDEF-GEOMETRY-COMMANDS-MAINLIST
<drawbox>: draws a box with an initial point and the size
<boxfill> indicates if solid or face and what faces are not hide
BoxSolid (solid)
BoxB (all^top)
BoxA (all)
BoxC (bottom|right|right)
27
CASEDEF-GEOMETRY-COMMANDS-MAINLIST
BeachFace
BeachFace
(mask=128)
<drawbeach>: draws a beach with the lateral points that formed the profile of the beach
mask indicates the faces to be hidden .
28
CASEDEF-GEOMETRY-COMMANDS-MAINLIST
<drawsphere>: draws a sphere with the center point and the radius
Sphere
(drawmode=solid)
Sphere
(drawmode=face)
when face:
ctesphere indicates the width of the sphere
ctespherenumsides indicates the number of triangles used
to create the VTK of polygons
29
CASEDEF-GEOMETRY-COMMANDS-MAINLIST
<drawcylinder>: draws a cylinder with two points and radius
mask indicates the faces to be hide
Cylinder
(drawmode=solid)
Cylinder
(drawmode=face)
when face:
ctecylindertube indicates the width of the tube
ctecylindercover indicates the width of the covers
ctespherenumsides indicates the number of triangles used
to create the VTK of polygons
30
CASEDEF-GEOMETRY-COMMANDS-MAINLIST
31
CASEDEF-GEOMETRY-COMMANDS-MAINLIST
32
CASEDEF-GEOMETRY-COMMANDS-MAINLIST
<fillpoint>: fills with points starting from the seed
<fillbox>: fills with points starting from the seed
within the limits defined by a box
<fillfigure>: fills with points starting from the seed
within the limits defined by a figure
33
CASEDEF-GEOMETRY-COMMANDS-MAINLIST
seed point
limits of the
domain to fill
CASEDEF-INITIALS
35
CASEDEF-INITIALS
different initial velocities are imposed to two
volumes of fluid mk=1 (sphere) and mk=2 (box)
vsphere = (1.05,0,4.905)
vbox = (-0.875,0,5.886)
36
CASEDEF-INITIALS
colour represents velocity
37
CASEDEF-FLOATINGS
38
CASEDEF-PROPERTIES
Hay una
nueva
seccin can
llamada
properties
donde
puedentodefinir
variables
<properties>:
New
properties
be defined
and will
bese
assigned
one orlasseveral
mk.que se desee y es
pueden asignar a uno o varios MK.
<casedef>
...
Hay una nueva seccin
llamada properties donde se pueden definir las variables que se desee y estas se
<properties>
<links>
pueden asignar a uno
o varios MK.
<link mkfluid="0" property="material_1" />
<link mkbound="3-6,1" property="material_2+data_x" />
<casedef>
</links>
...
<propertyfile file="run/ftdata_ext.xml" path="case.materials" />
<properties>
<property name="material_1" weight="1.35" other="pepe"/>
<links>
<property name="material_2" begin="168" count="973">
<link mkfluid="0" property="material_1" />
<massbody value="4728.78" />
<link mkbound="3-6,1" property="material_2+data_x" />
<center x="4.99" y="5" z="7.03" />
</links>
</property>
<propertyfile
file="run/ftdata_ext.xml" path="case.materials" />
name="data_x"
weight="1.35"
/>
<property<property
name="material_1"
weight="1.35"
other="pepe"/>
</properties>
<property name="material_2" begin="168" count="973">
</casedef>
<massbody value="4728.78" />
<center x="4.99" y="5" z="7.03" />
</property>
Cada etiqueta de property tiene un nombre y puede agrupar varios valores cuyo contenido puede
<property name="data_x" weight="1.35" />
o nmero, como por ejemplo weight y other en:
</properties>
<property name="material_1" weight="1.35" other="pepe"/>
</casedef>
Each label of property has a name and can group multiple values whose content can be text or
number,
such as de
weight
and other
in nombre y puede agrupar varios valores cuyo contenido puede ser texto
Cada etiqueta
property
tiene un
o nmero, como por ejemplo weight y other en:
<property name="material_1" weight="1.35" other="pepe"/>
39
CASEDEF-PROPERTIES
property can also contain values with subvalues such as massbody and center in:
Tambin pueden contener valores con subvalores como massbody y center en:
<property name="material_2" begin="168" count="973">
<property name="material_2"
begin="168"
<center x="4.99" y="5"
z="7.03" count="973">
/>
Tambin<massbody
pueden
contener
valores con
</property>
value="4728.78"
/> subvalores como massbody y center en:
<property
name="material_2"
begin="168"
count="973">
<center
x="4.99"
y="5" z="7.03"
/>
<massbody
value="4728.78"
/>
</property>
Es posible
cargar estas properties desde un fichero externo usando propertyfile. En ese ca
En ese ca
posible
cargar
desde
externo
usando
propertyfile. En ese ca
el nombre
del
fichero
laestas
ruta
para acceder
aun
la fichero
seccin
con lasmust
properties
The
name ofEsthe
file
and
they path
toproperties
access
to the
section
with properties
be indicated
Ejemplo
de
fichero
ftdata_ext.xml:
<propertyfile
file="run/ftdata_ext.xml"
/>
el nombre
del
fichero
y la ruta para acceder a lapath="case.materials"
seccin con las properties
<case>
Example
<propertyfile
file="run/ftdata_ext.xml" path="case.materials" />
<materials>
de fichero<property
ftdata_ext.xml:
name="uno" value="1.35"/>
ofEjemplo
the file Ejemplo
ftdata_ext.xml:
de
fichero
ftdata_ext.xml:
<property
name="dos" value="168">
<case>
<massbody value="4728.78" />
<case>
<materials>
</property>
<materials>
<property name="uno" value="1.35"/>
</materials>
<property name="uno" value="1.35"/>
<property
name="dos" value="168">
</case> <property name="dos" value="168">
<massbody
value="4728.78"
/> />
<massbody
value="4728.78"
</property>
</property>
</materials>
</materials>
</case> </case>
40
CASEDEF-PROPERTIES
Section links: one or more property can be assigned with one or several values of mk
In <link mkfluid="0" property="material_1"/>
A property
can
also directly
in thedirectamente
definition of the
bodies:
Tambin
esbe
posible
indicarleindicated
una property
en lafloating
definicin
de los floating bodies.
<floatings>
...
<floating mkbound="4" property="Material_2">
<massbody value="1300" />
<inertia x="20" y="22" z="24" />
</floating>
</floatings>
41
CASEDEF-PROPERTIES
los MK que realmente existan. As en DualSPHysics se puede acceder a todos los valores asignados a cada
MK.
<particles np="1494" nb="313" nbf="313" mkboundfirst="11" mkfluidfirst="1">
<fixed mkbound="0" mk="11" begin="0" count="229" />
<fixed mkbound="1" mk="12" begin="229" count="28" property="data_x+material_2" />
<fixed mkbound="2" mk="13" begin="257" count="28" />
<fixed mkbound="4" mk="15" begin="285" count="28" property="data_x+material_2" />
<fluid mkfluid="0" mk="1" begin="313" count="1146" property="material_1" />
<fluid mkfluid="1" mk="2" begin="1459" count="35" />
<properties>
<links>
<link mk="1" property="material_1" />
<link mk="12,15" property="data_x+material_2" />
</links>
<property name="material_1" weight="1.35" other="pepe"/>
<property name="material_2" begin="168" count="973">
<massbody value="4728.78" />
<center x="4.99" y="5" z="7.03" />
</property>
<property name="data_x" weight="1.35" />
</properties>
</particles>
Para acceder a estos datos dentro de DualSPHysics se utiliza el objeto de tipo JSpaceParts. Con este objeto se
poda obtener, para cada bloque de partculas, informacin como: el nmero de partculas, el tipo de
42
partculas, el mk, informacin propia de los floating bodies, Ahora adems se puede obtener todos los
CASEDEF-MOTION
Motion01: uniform rectilinear motion (<mvrect />) that also includes pauses (<wait />)
43
CASEDEF-MOTION
Motion01: uniform rectilinear motion (<mvrect />) that also includes pauses (<wait />)
44
CASEDEF-MOTION
Motion02: combination of two uniform rectilinear motion (<mvrect />)
45
CASEDEF-MOTION
Motion02: combination of two uniform rectilinear motion (<mvrect />)
46
CASEDEF-MOTION
Motion03: movement of an object depending on the
movement of another (hierarchy of objects)
47
CASEDEF-MOTION
Motion03: movement of an object depending on the movement of another (hierarchy of objects)
48
CASEDEF-MOTION
Motion04: accelerated rectilinear motion (<mvrectace />)
49
CASEDEF-MOTION
Motion04: accelerated rectilinear motion (<mvrectace />)
50
CASEDEF-MOTION
Motion05: rotational motion (<mvrot />)
51
CASEDEF-MOTION
Motion05: rotational motion (<mvrot />)
52
CASEDEF-MOTION
Motion06: accelerated rotation motion (<mvrotace />) and accelerated circular motion (<mvcirace />).
CASEDEF-MOTION
Motion06: accelerated rotation motion (<mvrotace />) and accelerated circular motion (<mvcirace />).
54
CASEDEF-MOTION
Motion07: sinusoidal movement (<mvrectsinu />, <mvrotsinu />, <mvcirsinu />)
55
CASEDEF-MOTION
Motion07: sinusoidal movement (<mvrectsinu />, <mvrotsinu />, <mvcirsinu />)
56
CASEDEF-MOTION
Motion08: predefined movement with data from an external file (<mvpredef />)
57
CASEDEF-MOTION
Motion08: predefined movement with data from an external file (<mvpredef />)
58
EXECUTION-PARAMETERS
<parameters>:
Consits on a set of parameters for the DualSPHysics execution
StepAlgorithm, Kernel, ViscoTreatment, Shepard, DBC are based on SPHysics formulation
GenCase keeps this information in the new XML to be loaded by DualSPHysics
59