emanuele casarotti verce training, university of liverpool (uk), 1
TRANSCRIPT
Virtual(Earthquake(and(seismology(Research(Community(e8science(environment(in(Europe(Project(283543(–(FP78INFRASTRUCTURES8201182(–(www.verce.eu(–([email protected]
HEX Meshing 101Emanuele Casarotti
VERCE training, University of Liverpool (UK), 1-3 July 2015
Istituto Nazionale di Geofisica e Vulcanologia @INGVterremoti
VERCE training, University of Liverpool (UK), 1-3 July 2015Hex(Meshing(101
MESHINGPDEquations are discretized and solved inside subdomains (cells, elements)
Hexahedra Prism Tetrahedra Pyramid
Meshing depends on your problem and your numerical method
Mesh design affects directly size and performance of your simulation and indirectly the cost of your hardware.
VERCE training, University of Liverpool (UK), 1-3 July 2015Hex(Meshing(101
MESH: an underestimated task
MESHGEOMETRY CREATION
DESIGN
SOLVER
PDE - SIMULATION WORKFLOW
MESHING
VERCE training, University of Liverpool (UK), 1-3 July 2015Hex(Meshing(101
MESH: an underestimated task
MESHGEOMETRY CREATION
DESIGN
SOLVER
PDE - SIMULATION WORKFLOW
MESHING
HUMAN time
10%weeks
CPU time
0%15%
80%
90%5%
CPU time
VERCE training, University of Liverpool (UK), 1-3 July 2015Hex(Meshing(101
MESHER (CUBIT, TRELIS, GMESH, GID, ABAQUS, ANSYS,HEXPRESS,MESHGEMS…)
CAD MESHACIS (CUBIT, Autocad)
STEP IGES (Rhinoceros)
Facets (GOCAD) STL
ExodusII
Graphical Interface
Command line
Abaqus (ASCII) IDEAS NASTRAN Petran LS-Dyna ExodusII (NETCDF)
MESHING WORKFLOW
VERCE training, University of Liverpool (UK), 1-3 July 2015Hex(Meshing(101
Map
Sweep
Sub-map
Tetmesh
Triprimitive
THEX
VERCE training, University of Liverpool (UK), 1-3 July 2015Hex(Meshing(101
Tri/Tet Methods
http://www.simulog.fr/mesh/gener2.htm
Octree Advancing Front Delaunay
http://www.ansys.com
courtesy of Steven Owen (SANDIA)
VERCE training, University of Liverpool (UK), 1-3 July 2015Hex(Meshing(101
courtesy of Steven Owen (SANDIA)
Quad/Hex Methods
Structured • Requires geometry to conform to specific characteristics • Regular patterns of quads/hexes formed based on characteristics of geometry
Unstructured • No specific requirements for geometry • quads/hexes placed to conform to geometry. • No connectivity requirement (although optimization of connectivity is beneficial)
• Internal nodes always attached to same number of elements
VERCE training, University of Liverpool (UK), 1-3 July 2015Hex(Meshing(101
Structured
3D Mapped Meshing
• 6 topological surfaces • opposite surfaces must have similar mapped meshes
Geometry Requirements
Sweepingcourtesy of Steven Owen (SANDIA)
VERCE training, University of Liverpool (UK), 1-3 July 2015Hex(Meshing(101
Structured
3D Mapped Meshing
• 6 topological surfaces • opposite surfaces must have similar mapped meshes
Geometry Requirements
Sweepingcourtesy of Steven Owen (SANDIA)
VERCE training, University of Liverpool (UK), 1-3 July 2015Hex(Meshing(101
Structured
3D Mapped Meshing
• 6 topological surfaces • opposite surfaces must have similar mapped meshes
Geometry Requirements
Sweepingcourtesy of Steven Owen (SANDIA)
VERCE training, University of Liverpool (UK), 1-3 July 2015Hex(Meshing(101
Structured
3D Mapped Meshing
• 6 topological surfaces • opposite surfaces must have similar mapped meshes
Geometry Requirements
Sweepingcourtesy of Steven Owen (SANDIA)
VERCE training, University of Liverpool (UK), 1-3 July 2015Hex(Meshing(101
Structured
3D Mapped Meshing
• 6 topological surfaces • opposite surfaces must have similar mapped meshes
Geometry Requirements
Sweepingcourtesy of Steven Owen (SANDIA)
VERCE training, University of Liverpool (UK), 1-3 July 2015Hex(Meshing(101
Structured
3D Mapped Meshing
• 6 topological surfaces • opposite surfaces must have similar mapped meshes
Geometry Requirements
Sweepingcourtesy of Steven Owen (SANDIA)
VERCE training, University of Liverpool (UK), 1-3 July 2015Hex(Meshing(101
Structured
3D Mapped Meshing
• 6 topological surfaces • opposite surfaces must have similar mapped meshes
Geometry Requirements
Sweepingcourtesy of Steven Owen (SANDIA)
VERCE training, University of Liverpool (UK), 1-3 July 2015Hex(Meshing(101
Structured
3D Mapped Meshing
• 6 topological surfaces • opposite surfaces must have similar mapped meshes
Geometry Requirements
Sweepingcourtesy of Steven Owen (SANDIA)
VERCE training, University of Liverpool (UK), 1-3 July 2015Hex(Meshing(101
Full complexity
Exponential ACCURACY of high-order methods
Suitable for implementation in parallel architectures
Mechanical proprieties can vary inside each element
Low Number of elements for wavelength
EFFICIENCY!!!! (Diagonal Mass Matrix - Explicit time scheme)
SPECTRAL ELEMENT METHOD (SPECFEM3D)
VERCE training, University of Liverpool (UK), 1-3 July 2015Hex(Meshing(101
Full complexity
Exponential ACCURACY of high-order methods
Suitable for implementation in parallel architectures
Mechanical proprieties can vary inside each element
Low Number of elements for wavelength
EFFICIENCY!!!! (Diagonal Mass Matrix - Explicit time scheme)
HEX
SPECTRAL ELEMENT METHOD (SPECFEM3D)
VERCE training, University of Liverpool (UK), 1-3 July 2015Hex(Meshing(101
MESH: features
Seismic velocity can vary inside the volume
UNSTRUCTURED - ANISOTROPIC - CONFORMAL (honoring the geology)
(usually the dimension of the elements increase with depth)
VERCE training, University of Liverpool (UK), 1-3 July 2015Hex(Meshing(101
MESH: parallelism?
Little volume (10x10x10 km)
Huge volume (300x300x100 km)
Long period ~ 1 million ~ 1/5 millions
Short period ~ 5/10 milions ~ 0.5/10 billions (Earth ~ 20 Ghex)
VERCE training, University of Liverpool (UK), 1-3 July 2015Hex(Meshing(101
meshing - control ∆t (S.California)
VERCE training, University of Liverpool (UK), 1-3 July 2015Hex(Meshing(101
meshing - control resolution (Alaska)
VERCE training, University of Liverpool (UK), 1-3 July 2015Hex(Meshing(101
MESHER: CUBIT/TRELIS
US national lab: cubit.sandia.gov
Academic: csimsoft.com
Trelis
2D/3D solid-modeler mesher:Geometry preparationAutomatic meshing
algorithmsQuality analysisHexahedra/Tetrahedra
The CUBIT Geometry and Mesh Generation Toolkit
VERCE training, University of Liverpool (UK), 1-3 July 2015Hex(Meshing(101
THE MESHING WORKFLOW
Import Solid
Model
1
Simplify
Geometry
2
Decompose
Geometry
3
Imprint &
Merge
4
Set Schemes
& Intervals
5
Mesh
6
Check
Quality
7
Apply
B.C.s
8
Export
Mesh
9
VERCE training, University of Liverpool (UK), 1-3 July 2015Hex(Meshing(101
THE MESHING WORKFLOW
Import Solid
Model
1
Simplify
Geometry
2
Decompose
Geometry
3
Imprint &
Merge
4
Set Schemes
& Intervals
5
Mesh
6
Check
Quality
7
Apply
B.C.s
8
Export
Mesh
9
Order!!
VERCE training, University of Liverpool (UK), 1-3 July 2015Hex(Meshing(101
THE MESHING WORKFLOW
Import Solid
Model
1
Simplify
Geometry
2
Decompose
Geometry
3
Imprint &
Merge
4
Set Schemes
& Intervals
5
Mesh
6
Check
Quality
7
Apply
B.C.s
8
Export
Mesh
9
VERCE training, University of Liverpool (UK), 1-3 July 2015Hex(Meshing(101
I - Construction of the geometryII - Meshing the geometryIII - Boundary condition + Export the mesh
VERCE training, University of Liverpool (UK), 1-3 July 2015Hex(Meshing(101
I - Construction of the geometryII - Meshing the geometryIII - Boundary condition + Export the mesh
0 - Define purpose and resolution of mesh
VERCE training, University of Liverpool (UK), 1-3 July 2015Hex(Meshing(101
I - Construction of the geometryII - Meshing the geometryIII - Boundary condition + Export the mesh
0 - Define purpose and resolution of mesh
VERCE training, University of Liverpool (UK), 1-3 July 2015Hex(Meshing(101
I - Construction of the geometryII - Meshing the geometryIII - Boundary condition + Export the mesh
0 - Define purpose and resolution of mesh
VERCE training, University of Liverpool (UK), 1-3 July 2015Hex(Meshing(101
I - Construction of the geometryII - Meshing the geometryIII - Boundary condition + Export the mesh
0 - Define purpose and resolution of mesh
VERCE training, University of Liverpool (UK), 1-3 July 2015Hex(Meshing(101
MESHING STRATEGIESa) brutal (by hand in cubit)
VERCE training, University of Liverpool (UK), 1-3 July 2015Hex(Meshing(101
MESHING STRATEGIESa) brutal (by hand in cubit)b) “Not-honoring”
VERCE training, University of Liverpool (UK), 1-3 July 2015Hex(Meshing(101
MESHING STRATEGIES
10.4.1983 ML 3.8
STH
NIS
DMPOC9
CAI
STH
NIS OC9
DMP
CAI
a) brutal (by hand in cubit)
c) GEOcubit (scripting)b) “Not-honoring”
VERCE training, University of Liverpool (UK), 1-3 July 2015Hex(Meshing(101
Grenoble Valley, Marco Stupazzini et . al. 2007
MESHING STRATEGIES (a)
VERCE training, University of Liverpool (UK), 1-3 July 2015Hex(Meshing(101
MESHING STRATEGIES (b)
Grenoble Valley, Marco Stupazzini et . al. 2007
VERCE training, University of Liverpool (UK), 1-3 July 2015Hex(Meshing(101
MESHING STRATEGIES (b)
Grenoble Valley, Marco Stupazzini et . al. 2007
VERCE training, University of Liverpool (UK), 1-3 July 2015Hex(Meshing(101
goal: meshing automatically some reference geological cases
MESHING STRATEGIES (c)
VERCE training, University of Liverpool (UK), 1-3 July 2015Hex(Meshing(101
goal: meshing automatically some reference geological cases
MESHING STRATEGIES (c)
VERCE training, University of Liverpool (UK), 1-3 July 2015Hex(Meshing(101
goal: meshing automatically some reference geological cases
MESHING STRATEGIES (c)
VERCE training, University of Liverpool (UK), 1-3 July 2015Hex(Meshing(101
goal: meshing automatically some reference geological cases
MESHING STRATEGIES (c)
VERCE training, University of Liverpool (UK), 1-3 July 2015Hex(Meshing(101
goal: meshing automatically some reference geological cases
MESHING STRATEGIES (c)
VERCE training, University of Liverpool (UK), 1-3 July 2015Hex(Meshing(101
goal: meshing automatically some reference geological cases
MESHING STRATEGIES (c)
VERCE training, University of Liverpool (UK), 1-3 July 2015Hex(Meshing(101
10.4.1983 ML 3.8
STH
NIS
DMPOC9
CAI
STH
NIS OC9
DMP
CAI
Numb. Hex. : ~6.200.000 256 processors
~300 s wall clock
MESHING STRATEGIES (c)
Golfo di Napoli, E. Casarotti et . al. 2007
VERCE training, University of Liverpool (UK), 1-3 July 2015Hex(Meshing(101
Semi-automatic (user defines interfaces, tomography, topography,To, ∆h)
Parallel (faster both for the creation of the NURBS geometry and for the mesh - huge mesh and volume)
“cake-layered” volume (main discontinuities honored + tomography)
Each chunk has the same number of elements
goal: meshing automatically some reference geological cases MESHING STRATEGIES (c)
VERCE training, University of Liverpool (UK), 1-3 July 2015Hex(Meshing(101
https://github.com/geodynamics/specfem3d/tree/devel/CUBIT_GEOCUBITdeveloper*
mesh: layered geological volume (parallel)
mesh: spherical layered geological volume*
mesh: hex27*mesh: cpml*
mesh: export in SPECFEM3D_cartesian formatenvironment: python script, cubit GUI, interative, cluster queue
mesh: automatic assign of the boundary condition
mesh: vertical “sandwich” layered geological volume*
GEOCUBIT
VERCE training, University of Liverpool (UK), 1-3 July 2015Hex(Meshing(101
GEOCUBIT - simplify
GEOCUBIT.py --build_volume --mesh —cfg=examples/scal.cfg —id_proc=[ID]
GEOCUBIT.py --collect —meshfiles=mesh_vol_*.cub --export2SPECFEM3D
[cubit.options]cubit_info=offecho_info=offworking_dir=mesh_california/output_dir=mesh_california/output
[simulation.cpu_parameters]number_processor_xi =15number_processor_eta =15#[geometry.volumes]volume_type = layercake_volume_ascii_regulargrid_regularmaplatitude_min = 131000latitude_max = 738000longitude_min = 3480000longitude_max = 4058000nx = 6071ny = 5781unit = utm
[geometry.volumes.layercake]nz = 3bottomflat = Truedepth_bottom = -60000filename =moho_6071_5781surf.xyz,topo_6071_5781surf.xyz,geometry_format=ascii
[meshing]map_meshing_type=regularmapiv_interval=3,4size=7500or_mesh_scheme=mapntripl=2smoothing=Falsecoarsening_top_layer=Falserefinement_depth=2,2
6 MHex - Carl Tape
VERCE training, University of Liverpool (UK), 1-3 July 2015Hex(Meshing(101
a(short(praXcal(on(CUBIT/TRELIS
VERY
VERCE training, University of Liverpool (UK), 1-3 July 2015Hex(Meshing(101
a(short(praXcal(on(CUBIT/TRELIS
VERY • Creating the geometry
• Setting the interval sizes and meshing schemes
• Meshing the geometry
• Specifying the boundary conditions
• Exporting the mesh
VERCE training, University of Liverpool (UK), 1-3 July 2015Hex(Meshing(101
TOOLBARS
COMMAND(PANEL
COMMAND(LINE
GRAPHIC(WINDOW
POWER(TOOLS((TREE)
PROPERTIES(PAGE
VERCE training, University of Liverpool (UK), 1-3 July 2015Hex(Meshing(101
TOOLBARS
COMMAND(PANEL
COMMAND(LINE
GRAPHIC(WINDOW
POWER(TOOLS((TREE)
PROPERTIES(PAGE
VERCE training, University of Liverpool (UK), 1-3 July 2015Hex(Meshing(101
TOOLBARS
COMMAND(PANEL
COMMAND(LINE
GRAPHIC(WINDOW
POWER(TOOLS((TREE)
PROPERTIES(PAGE
VERCE training, University of Liverpool (UK), 1-3 July 2015Hex(Meshing(101
TOOLBARS
COMMAND(PANEL
COMMAND(LINE
GRAPHIC(WINDOW
POWER(TOOLS((TREE)
PROPERTIES(PAGE
VERCE training, University of Liverpool (UK), 1-3 July 2015Hex(Meshing(101
TOOLBARS
COMMAND(PANEL
COMMAND(LINE
GRAPHIC(WINDOW
POWER(TOOLS((TREE)
PROPERTIES(PAGE
VERCE training, University of Liverpool (UK), 1-3 July 2015Hex(Meshing(101
TOOLBARS
COMMAND(PANEL
COMMAND(LINE
GRAPHIC(WINDOW
POWER(TOOLS((TREE)
PROPERTIES(PAGE
VERCE training, University of Liverpool (UK), 1-3 July 2015Hex(Meshing(101
TOOLBARS
COMMAND(PANEL
COMMAND(LINE
GRAPHIC(WINDOW
POWER(TOOLS((TREE)
PROPERTIES(PAGE
VERCE training, University of Liverpool (UK), 1-3 July 2015Hex(Meshing(101
TOOLBARS
COMMAND(PANEL
COMMAND(LINE
GRAPHIC(WINDOW
POWER(TOOLS((TREE)
PROPERTIES(PAGE
VERCE training, University of Liverpool (UK), 1-3 July 2015Hex(Meshing(101
TOOLBARS
COMMAND(PANEL
COMMAND(LINE
GRAPHIC(WINDOW
POWER(TOOLS((TREE)
PROPERTIES(PAGE
VERCE training, University of Liverpool (UK), 1-3 July 2015Hex(Meshing(101
TOOLBARS
COMMAND(PANEL
COMMAND(LINE
GRAPHIC(WINDOW
POWER(TOOLS((TREE)
PROPERTIES(PAGE
VERCE training, University of Liverpool (UK), 1-3 July 2015Hex(Meshing(101
TOOLBARS
COMMAND(PANEL
COMMAND(LINE
GRAPHIC(WINDOW
POWER(TOOLS((TREE)
PROPERTIES(PAGE
VERCE training, University of Liverpool (UK), 1-3 July 2015Hex(Meshing(101
Tools>OpXons..>Layout>(Show(script(tab
VERCE training, University of Liverpool (UK), 1-3 July 2015Hex(Meshing(101
Tools>OpXons..>Layout>(Show(script(tab
VERCE training, University of Liverpool (UK), 1-3 July 2015Hex(Meshing(101
Tools>OpXons..>Layout>(Show(script(tab
VERCE training, University of Liverpool (UK), 1-3 July 2015Hex(Meshing(101
MESHING(“HELLO(WORD”
brick x 10 volume all size .5 mesh volume all
VERCE training, University of Liverpool (UK), 1-3 July 2015Hex(Meshing(101
VERTEX
SURFACE
CURVE NODE
FACE/QUAD
VERCE training, University of Liverpool (UK), 1-3 July 2015Hex(Meshing(101
MESHING(“LAYERED”
brick x 10 webcut body all with plane zplane offset 0 volume 1 size .5 volume 2 size 1 mesh vol all
VERCE training, University of Liverpool (UK), 1-3 July 2015Hex(Meshing(101
MESHING(“LAYERED”
brick x 10 webcut body all with plane zplane offset 0 volume 1 size .5 volume 2 size 1 mesh vol all
VERCE training, University of Liverpool (UK), 1-3 July 2015Hex(Meshing(101
MESHING(“LAYERED”
brick x 10 webcut body all with plane zplane offset 0 volume 1 size .5 volume 2 size 1 imprint body all merge body all mesh volume all
VERCE training, University of Liverpool (UK), 1-3 July 2015Hex(Meshing(101
MESHING(“FAULT”brick x 10 webcut body all with plane yplane offset 0 rotate 40 about x unite body 2 4 imprint vol all merge vol all mesh vol all
VERCE training, University of Liverpool (UK), 1-3 July 2015Hex(Meshing(101
MESHING(“FAULT”brick x 10 webcut body all with plane yplane offset 0 rotate 40 about x unite body 2 4 imprint vol all merge vol all mesh vol all
VERCE training, University of Liverpool (UK), 1-3 July 2015Hex(Meshing(101
MESHING(“FAULT”brick x 10 webcut body all with plane yplane offset 0 rotate 40 about x imprint merge unite body 2 4 imprint vol all merge vol all surface 25 19 31 scheme pave surface 25 19 31 scheme pave mesh surface 25 19 31 volume all redistribute nodes off volume all scheme Sweep sweep_transform least_squares volume all autosmooth_target off mesh vol all
CHECK_QUALITY
VERCE training, University of Liverpool (UK), 1-3 July 2015Hex(Meshing(101
MESHING(“REFINE”brick x 10 webcut body all with plane zplane offset 0 volume 1 size .5 volume 2 size 1 imprint body all merge body all mesh volume all refine hex in vol 1 numsplit 1 bias 1.0 depth 1 smooth
VERCE training, University of Liverpool (UK), 1-3 July 2015Hex(Meshing(101
MESHING(“REFINE”brick x 10 webcut body all with plane zplane offset 0 volume 1 size .5 volume 2 size 1 imprint body all merge body all mesh volume all refine surface 1 numsplit 1 bias 1 depth 2 smooth
VERCE training, University of Liverpool (UK), 1-3 July 2015Hex(Meshing(101
EXPORTING(set duplicate block elements off block 1 hex in vol 1 block 2 hex in vol 2 set large exodus file on export mesh "test.e" overwrite
VERCE training, University of Liverpool (UK), 1-3 July 2015Hex(Meshing(101
FIRST: get the topography
VERCE training, University of Liverpool (UK), 1-3 July 2015Hex(Meshing(101
{1} create vertex from topography
VERCE training, University of Liverpool (UK), 1-3 July 2015Hex(Meshing(101
{2} create spline from vertex
VERCE training, University of Liverpool (UK), 1-3 July 2015Hex(Meshing(101
{3} create surface net u-v curve
VERCE training, University of Liverpool (UK), 1-3 July 2015Hex(Meshing(101
{4} delete vertex and curve
VERCE training, University of Liverpool (UK), 1-3 July 2015Hex(Meshing(101
FIRST: get the topography
VERCE training, University of Liverpool (UK), 1-3 July 2015Hex(Meshing(101
[cubit.options] cubit_info=onecho_info=onjou_info=offjer_info=offworking_dir=tmpoutput_dir=gubbiosave_geometry_cubit = Truesave_surface_cubit = Falseexport_exodus_mesh = Truemonitored_cpu=0localdir_is_globaldir = Falseparallel_import = False#scratchdir=None
[simulation.cpu_parameters] number_processor_xi =1number_processor_eta =1
GUBBIO.CFG
VERCE training, University of Liverpool (UK), 1-3 July 2015Hex(Meshing(101
[geometry.volumes] volume_type = layercake_volume_ascii_regulargrid_regularmaplongitude_min = 266906longtude_max = 324906latitude_min = 4776003latitude_max = 4856003nx = 30ny = 41unit = utm
[geometry.volumes.layercake] nz = 2#included the bottombottomflat = Truedepth_bottom = -60000filename = gubbio.vtk.square.utm33_30x41.xyzgeometry_format=ascii
GUBBIO.CFG
VERCE training, University of Liverpool (UK), 1-3 July 2015Hex(Meshing(101
GUBBIO.CFG
[meshing] map_meshing_type=regularmapiv_interval=24,size=5000or_mesh_scheme=mapntripl=1smoothing=Falsecoarsening_top_layer=Falserefinement_depth=3
VERCE training, University of Liverpool (UK), 1-3 July 2015Hex(Meshing(101
from geocubitlib import volumes volumes.volumes(cfg)
cubit.cmd('cd "/Users/casarotti/Dropbox (ICS)/TRELIS/gubbio_mesh”') cfg=“gubbio.cfg” import sys sys.path.append(“yourdirectory”)
from geocubitlib import mesh_volume mesh_volume.mesh(cfg)
from geocubitlib import exportlib from geocubitlib import boundary_definition
boundary_definition.define_bc() exportlib.e2SEM(listblock=[4],listflag=[-1])
VERCE training, University of Liverpool (UK), 1-3 July 2015Hex(Meshing(101
ITALY&(5.8&MHex)
C.&ITALY&(0.2&MHex)
N.&ITALY&(1.6&MHex)&
S.&ITALY&(1.8&MHex)
CHILE&(Maule)
FULL&ITALY&(Di&Stefano&2014)
3s 4s(
CENTRAL&ITALY&
(Chiarabba&2010)
3s
NORTH&ITALY&(Di&Stefano&2011)
4s
SOUTH&ITALY&
(Di&Stefano&2011)
3s
Maule&(Hicks,&2012)
3s