Skip to content

2 LAYERS: USING GEOCUBIT IN THE CUBIT GUI, DEFINING BOUNDARY CONDITIONS

casarotti edited this page Nov 8, 2013 · 3 revisions

mesh.cub files is here https://www.dropbox.com/s/o6xf691lkhnla25/mesh.cub figure

go in the cubit script tab:

  1. import the cubit file (boundary conditions are not defined)

cubit.cmd('open "mesh.cub"')

2) define the blocks

cubit.cmd('block 1 hex in vol 1')
cubit.cmd('block 2 hex in vol 2')

  1. import geocubitlib library

from geocubitlib import exportlib

4) define the boundary conditions

exportlib.collect()

  1. export to SPECFEM3D mesh format

exportlib.e2SEM(outdir='.')

Writing ./mesh_file.....
number of elements: 948204
prova
[1, 2] [1, 2]
1 1
652716
2 2
295488

Writing ./materials_file.....
1 1
2 2

Writing ./nodes_coords_file.....
number of nodes: 974302

Writing ./free_or_absorbing_surface_file_zmax.....
block name: Block id: 1001
number of faces = 26244
block name: Block id: 1002
bottom
number of faces = 324
block name: Block id: 1003
xmin
number of faces = 6534
block name: Block id: 1004
ymin
number of faces = 6534
block name: Block id: 1005
xmax number of faces = 6534 block name: Block id: 1006 ymax
number of faces = 6534

Writing ./nummaterial_velocity_file.....
(0, 1.0, 'Block')
prop 1.0
0 1 Block --> sintax: #material_domain_id #material_id #rho #vp #vs #Q_kappa #Q_mu #anisotropy
(0, 2.0, 'Block')
prop 2.0
0 2 Block --> sintax: #material_domain_id #material_id #rho #vp #vs #Q_kappa #Q_mu #anisotropy

END SPECFEM3D exporting process......

  1. check that the process exports 10 not empty files

absorbing_surface_file_ymax
nummaterial_velocity_file
absorbing_surface_file_xmax
absorbing_surface_file_ymin
absorbing_surface_file_xmin
absorbing_surface_file_bottom
free_or_absorbing_surface_file_zmax
nodes_coords_file
materials_file
mesh_file

  1. edit the nummaterial_velocity_file according to your parameters

for example from

0 1 vol1 --> sintax: #material_domain_id #material_id #rho #vp #vs #Q_kappa #Q_mu #anisotropy
0 2 vol2 --> sintax: #material_domain_id #material_id #rho #vp #vs #Q_kappa #Q_mu #anisotropy

to

2 1 vol1 1500 2300 1800 9999.0 9999.0 0
2 2 vol2 1600 2500 20000 9999.0 9999.0 0

respecting the following order (see SPECFEM3D manual):

material_domain_id material_id rho vp vs Q_kappa Q_mu anisotropy

You can’t perform that action at this time.