[CIG-SHORT] Question about PETSc

tu xiang tuxiang2016 at outlook.com
Fri Aug 25 18:37:36 PDT 2017


I am sorry for sending a 40+MB emails.

It seems that the errors happened when generating the mesh model.

I think the errors happened while imprinting and merging the fault into the domain volume.  But I do not know how correct these errors. Would you give me some advices?

The mesh model generating files:
geometry.jou   and  mesh.jou

geometry.jou
# -*- Python -*- (syntax highlighting)
# ----------------------------------------------------------------------
# Set units to SI.
# ----------------------------------------------------------------------
# {Units('si')}
#
# ----------------------------------------------------------------------
# Reset geometry.
# ----------------------------------------------------------------------
reset

# Make sure undo is off to prevent errors in stitching volumes.
undo off

# ----------------------------------------------------------------------
# Create block
# ----------------------------------------------------------------------
#{blockLength=40.0*km}
#{blockWidth=24.0*km}
#{blockHeight=16.0*km}

brick x {blockWidth} y {blockLength} z {blockHeight}
#{idVol=Id("volume")}
volume {idVol} name "v_domain"

# Translate block so the top is at z=0
volume {idVol} move x {domain_x} y {domain_y} z {-0.5*blockHeight}

# ----------------------------------------------------------------------
# Create fault comprised of multiple planar segments
# ----------------------------------------------------------------------
#{flen=36.0*km}
#{fdep=10.0*km}

create vertex x 0.0 y {-flen/2} z 0.0
#{idL1=Id("vertex")}
create vertex x 0.0 y {-flen/2} z {-fdep}
#{idL2=Id("vertex")}

create vertex x 0.0 y {flen/2} z 0.0
#{idMb1=Id("vertex")}
create vertex x 0.0 y {flen/2} z {-fdep}
#{idMb2=Id("vertex")}

# Create planar surfaces
create surface vertex {idL1} {idMb1} {idMb2} {idL2}

# ----------------------------------------------------------------------
# Imprint all volumes, merging surfaces
# ----------------------------------------------------------------------
imprint all with volume all
merge all

# End of file


mesh.jou
# -*- Python -*- (syntax highlighting)
# ----------------------------------------------------------------------
# Generate geometry
# ----------------------------------------------------------------------
playback 'geometry.jou'

# ----------------------------------------------------------------------
# Create tet4 mesh at 5.0 km resolution.
# ----------------------------------------------------------------------

#{dx=0.5*km}
volume all size {dx}
volume all scheme tetmesh

# ----------------------------------------------------------------------
# Generate the mesh
# ----------------------------------------------------------------------
mesh surface all
mesh volume all

# ----------------------------------------------------------------------
# Create blocks for materials
# ----------------------------------------------------------------------
block 1 volume v_domain
block 1 name "crust"

# ----------------------------------------------------------------------
# Create nodesets for faults and boundary conditions.
# ----------------------------------------------------------------------
group "fault_edge" add node in curve 14
group "fault_edge" add node in curve 15
group "fault_edge" add node in curve 16
nodeset 30 group fault_edge
nodeset 30 name "fault_edge"

group "front_bd" add node in surface 6
nodeset 50 group front_bd
nodeset 50 name "front_bd"

group "back_bd" add node in surface 4
nodeset 51 group back_bd
nodeset 51 name "back_bd"

group "left_bd" add node in surface 3
nodeset 52 group left_bd
nodeset 52 name "left_bd"

group "right_bd" add node in surface 5
nodeset 53 group right_bd
nodeset 53 name "right_bd"

group "bottom_bd" add node in surface 2
nodeset 54 group bottom_bd
nodeset 54 name "bottom_bd"

group "demo_fault" add node in surface 7
nodeset 60 group demo_fault
nodeset 60 name "demo_fault"

# ----------------------------------------------------------------------
# Export exodus file
# ----------------------------------------------------------------------
export mesh "mesh.exo" dimension 3 overwrite


# End of file










-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.geodynamics.org/pipermail/cig-short/attachments/20170826/8df370a2/attachment.html>


More information about the CIG-SHORT mailing list