- end_boundaryendBoundary to assign to (non-looped) polyline end
Default:end
C++ Type:BoundaryName
Controllable:No
Description:Boundary to assign to (non-looped) polyline end
- loopFalseWhether edges should form a closed loop
Default:False
C++ Type:bool
Controllable:No
Description:Whether edges should form a closed loop
- nums_edges_between_points1 How many Edge elements to build between each point pair. If a single value is given, it is applied to all segments. Otherwise, the number of entries must match the number of segments.
Default:1
C++ Type:std::vector<unsigned int>
Controllable:No
Description:How many Edge elements to build between each point pair. If a single value is given, it is applied to all segments. Otherwise, the number of entries must match the number of segments.
- pointsThe points defining the polyline, in order
C++ Type:std::vector<libMesh::Point>
Controllable:No
Description:The points defining the polyline, in order
- start_boundarystartBoundary to assign to (non-looped) polyline start
Default:start
C++ Type:BoundaryName
Controllable:No
Description:Boundary to assign to (non-looped) polyline start
PolyLineMeshGenerator
Generates meshes from edges connecting a list of points.
Using the PolyLineMeshGenerator object from within the Mesh block of the input file will construct an open or closed (looped) one-dimensional manifold of Edge elements connecting each adjacent pair of points in a user-specified list. Points can live in 3-D space by default, but loops in the X-Y plane are particularly useful as inputs to subsequent triangulator mesh generators.
Example
The following Mesh block will connect the specified 3 points with a total of 9 Edge2 elements.
[Mesh<<<{"href": "../../syntax/Mesh/index.html"}>>>]
[poly]
type = PolyLineMeshGenerator<<<{"description": "Generates meshes from edges connecting a list of points.", "href": "PolyLineMeshGenerator.html"}>>>
points<<<{"description": "The points defining the polyline, in order"}>>> = '-1.0 0.0 0.0
1.0 1.0 1.0
1.0 2.0 3.0'
loop<<<{"description": "Whether edges should form a closed loop"}>>> = true
nums_edges_between_points<<<{"description": "How many Edge elements to build between each point pair. If a single value is given, it is applied to all segments. Otherwise, the number of entries must match the number of segments."}>>> = 3
[]
[](test/tests/meshgenerators/polyline_mesh_generator/polyline_mesh_generator_loop_refine.i)Input Parameters
- enableTrueSet the enabled status of the MooseObject.
Default:True
C++ Type:bool
Controllable:No
Description:Set the enabled status of the MooseObject.
- save_with_nameKeep the mesh from this mesh generator in memory with the name specified
C++ Type:std::string
Controllable:No
Description:Keep the mesh from this mesh generator in memory with the name specified
Advanced Parameters
- nemesisFalseWhether or not to output the mesh file in the nemesisformat (only if output = true)
Default:False
C++ Type:bool
Controllable:No
Description:Whether or not to output the mesh file in the nemesisformat (only if output = true)
- outputFalseWhether or not to output the mesh file after generating the mesh
Default:False
C++ Type:bool
Controllable:No
Description:Whether or not to output the mesh file after generating the mesh
- show_infoFalseWhether or not to show mesh info after generating the mesh (bounding box, element types, sidesets, nodesets, subdomains, etc)
Default:False
C++ Type:bool
Controllable:No
Description:Whether or not to show mesh info after generating the mesh (bounding box, element types, sidesets, nodesets, subdomains, etc)
Debugging Parameters
Input Files
- (test/tests/meshgenerators/polyline_mesh_generator/polyline_mesh_generator_loop_refine.i)
- (test/tests/meshgenerators/xy_delaunay_generator/xydelaunay_with_holes.i)
- (modules/optimization/examples/diffusion_reaction_XYDelaunay/parameter_mesh.i)
- (test/tests/meshgenerators/xy_delaunay_generator/xydelaunay_open_polyline.i)
- (test/tests/meshgenerators/polyline_mesh_generator/polyline_mesh_generator_multi_refine.i)
- (test/tests/meshgenerators/xy_delaunay_generator/xydelaunay_quadratic.i)
- (modules/xfem/test/tests/solid_mechanics_basic/double_cantilever_crack.i)
- (test/tests/meshgenerators/xy_delaunay_generator/xydelaunay_with_hole_names.i)
- (test/tests/meshgenerators/xy_delaunay_generator/xydelaunay_area_func.i)
- (modules/xfem/test/tests/mesh_cut_2D_fracture/double_cantilever_crack_2d.i)
- (test/tests/meshgenerators/polyline_mesh_generator/polyline_mesh_generator_multi_loop_refine.i)
- (test/tests/meshgenerators/xy_delaunay_generator/xydelaunay_bdry_layer.i)
- (test/tests/meshgenerators/xy_delaunay_generator/xydelaunay_nested.i)
- (test/tests/meshgenerators/xy_delaunay_generator/xydelaunay_auto_area_func.i)
- (test/tests/meshgenerators/xy_delaunay_generator/xydelaunay_multiline.i)
- (modules/reactor/test/tests/meshgenerators/gap_line_mesh_generator/bdry_gap.i)
- (test/tests/meshgenerators/xy_delaunay_generator/xydelaunay_stitching.i)
- (test/tests/meshgenerators/xy_delaunay_generator/xydelaunay_from_2d_bcids.i)
- (test/tests/meshgenerators/polyline_mesh_generator/polyline_mesh_generator_good_boundary.i)
- (modules/reactor/test/tests/meshgenerators/gap_line_mesh_generator/simple_gap.i)
- (modules/xfem/test/tests/mesh_cut_2D_fracture/inclined_center_crack.i)
- (test/tests/meshgenerators/xy_delaunay_generator/xydelaunay_from_1d_sbdids.i)
- (test/tests/meshgenerators/xy_delaunay_generator/xydelaunay_interior_pts.i)
- (test/tests/meshmodifiers/move_nodes_to_sphere/block.i)
- (modules/reactor/test/tests/meshgenerators/peripheral_ring_mesh_generator/err_mix_type.i)
- (test/tests/meshgenerators/polyline_mesh_generator/polyline_mesh_generator_bad_boundary.i)
- (test/tests/meshgenerators/xy_delaunay_generator/xydelaunay_mesh_generator.i)
- (test/tests/meshgenerators/polyline_mesh_generator/polyline_mesh_generator_loop.i)
- (test/tests/meshgenerators/polyline_mesh_generator/polyline_mesh_generator.i)
- (test/tests/meshgenerators/xy_delaunay_generator/xydelaunay_smoothed.i)
- (test/tests/meshgenerators/polyline_mesh_generator/polyline_mesh_generator_refine.i)
(test/tests/meshgenerators/polyline_mesh_generator/polyline_mesh_generator_loop_refine.i)
[Mesh]
[poly]
type = PolyLineMeshGenerator
points = '-1.0 0.0 0.0
1.0 1.0 1.0
1.0 2.0 3.0'
loop = true
nums_edges_between_points = 3
[]
[]
(test/tests/meshgenerators/polyline_mesh_generator/polyline_mesh_generator_loop_refine.i)
[Mesh]
[poly]
type = PolyLineMeshGenerator
points = '-1.0 0.0 0.0
1.0 1.0 1.0
1.0 2.0 3.0'
loop = true
nums_edges_between_points = 3
[]
[]
(test/tests/meshgenerators/xy_delaunay_generator/xydelaunay_with_holes.i)
[Mesh]
[outer_bdy]
type = PolyLineMeshGenerator
points = '-1.0 0.0 0.0
0.0 -1.0 0.0
1.0 0.0 0.0
0.0 2.0 0.0'
loop = true
[]
[hole_1]
type = PolyLineMeshGenerator
points = '-0.5 -0.1 0.0
-0.3 -0.1 0.0
-0.3 0.1 0.0
-0.5 0.1 0.0'
loop = true
[]
[hole_2]
type = PolyLineMeshGenerator
points = '0.3 -0.1 0.0
0.5 -0.1 0.0
0.5 0.1 0.0
0.3 0.1 0.0'
loop = true
[]
[triang]
type = XYDelaunayGenerator
boundary = 'outer_bdy'
holes = 'hole_1
hole_2'
add_nodes_per_boundary_segment = 3
refine_boundary = false
desired_area = 0.05
[]
[]
(modules/optimization/examples/diffusion_reaction_XYDelaunay/parameter_mesh.i)
[Mesh]
[outer_bdy]
type = PolyLineMeshGenerator
points = '0.0 0.0 0.0
0.5 0.0 0.0
1.0 0.0 0.0
1.0 0.5 0.0
1.0 0.75 0.0
1.0 0.875 0.0
1.0 1.0 0.0
0.875 1.0 0.0
0.75 1.0 0.0
0.5 1.0 0.0
0.0 1.0 0.0
0.0 0.5 0.0'
loop = true
[]
[triangulate]
type = XYDelaunayGenerator
boundary = 'outer_bdy'
interior_points = '0.5 0.5 0
0.5 0.75 0
0.75 0.5 0
0.75 0.75 0
0.75 0.875 0
0.875 0.75 0
0.875 0.875 0'
[]
[]
[Problem]
solve = false
[]
[AuxVariables]
# To allow for exodus outputting.
[dummy]
[]
[]
[Executioner]
type = Steady
[]
[Outputs]
exodus = true
execute_on = TIMESTEP_END
[]
(test/tests/meshgenerators/xy_delaunay_generator/xydelaunay_open_polyline.i)
[Mesh]
[outer_bdy]
type = PolyLineMeshGenerator
points = '-1.0 0.0 0.0
0.0 -1.0 0.0
1.0 0.0 0.0
0.0 2.0 0.0'
loop = false
[]
[triang]
type = XYDelaunayGenerator
boundary = 'outer_bdy'
add_nodes_per_boundary_segment = 3
refine_boundary = false
desired_area = 0.05
[]
[]
(test/tests/meshgenerators/polyline_mesh_generator/polyline_mesh_generator_multi_refine.i)
[Mesh]
[poly]
type = PolyLineMeshGenerator
points = '-1.0 0.0 0.0
1.0 1.0 1.0
1.0 2.0 3.0'
nums_edges_between_points = '3 4'
[]
[]
(test/tests/meshgenerators/xy_delaunay_generator/xydelaunay_quadratic.i)
[Mesh]
[fmg]
type = FileMeshGenerator
file = accg_one_layer_quadratic.e
[]
[ext]
type = PolyLineMeshGenerator
points = '-4.0 0.0 0.0
0.0 -4.0 0.0
4.0 0.0 0.0
0.0 4.0 0.0'
loop = true
[]
[xyd]
type = XYDelaunayGenerator
boundary = 'ext'
holes = 'fmg'
stitch_holes = 'true'
refine_holes = 'false'
verify_holes = 'false'
add_nodes_per_boundary_segment = 2
refine_boundary = true
desired_area = 1.0
tri_element_type = TRI6
[]
[]
(modules/xfem/test/tests/solid_mechanics_basic/double_cantilever_crack.i)
# 3D Double Cantiler beam example.
# Figure 9 in: Belytschko and Black (1999)
# https://doi.org/10.1002/(SICI)1097-0207(19990620)45:5<601::AID-NME598>3.0.CO;2-S
# to reproduce literature results the mesh must be refined, in addition to using smaller fracture domain integral radii and smaller crack growth increments
# search comments for "to reproduce literature use"
L = 11.8
H = 3.94
W = 4
poissons = 0.3
youngs = 3e7
a = 3.94
da = 0.3
dtheta = 5.71 # 1.43, 2.86, 5.71
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
volumetric_locking_correction = true
[]
[XFEM]
geometric_cut_userobjects = 'cut_mesh'
qrule = volfrac
output_cut_plane = true
[]
[Mesh]
[cut_profile]
type = PolyLineMeshGenerator
loop = false
points = '-0.01 0 -2.01
${a} 0 -2.01
${fparse a+da*cos(dtheta*pi/180)} ${fparse da*sin(dtheta*pi/180)} -2.01'
[]
[cut_surfaace]
type = AdvancedExtruderGenerator
input = cut_profile
direction = '0 0 1'
heights = '4.02'
num_layers = '3'
biases = '1'
[]
[tri]
type = ElementsToSimplicesConverter
input = cut_surfaace
save_with_name = cut_mesh
[]
[gen]
type = GeneratedMeshGenerator
dim = 3
nx = 30 # to reproduce literature use 240
ny = 11 # to reproduce literature use 81
nz = 4 # to reproduce literature use 10
xmin = 0
xmax = ${L}
ymin = '-${fparse H/2}'
ymax = '${fparse H/2}'
zmin = '-${fparse W/2}'
zmax = '${fparse W/2}'
elem_type = HEX8
[]
[bottom_left_elem]
type = ParsedGenerateSideset
input = gen
combinatorial_geometry = 'x < 0.21'
normal = '0 -1 0'
include_only_external_sides=true
new_sideset_name = bottom_left_elem
[]
[top_left_elem]
type = ParsedGenerateSideset
input = bottom_left_elem
combinatorial_geometry = 'x < 0.21'
normal = '0 1 0'
include_only_external_sides=true
new_sideset_name = top_left_elem
[]
final_generator = 'top_left_elem'
[]
[Functions]
[growth_func_v]
type = ParsedFunction
expression = 0.21 # to reproduce literature use 0.0125
[]
[]
[UserObjects]
[cut_mesh]
type = CrackMeshCut3DUserObject
mesh_generator_name = 'cut_mesh'
growth_dir_method = MAX_HOOP_STRESS
size_control = 1
n_step_growth = 1
growth_rate = growth_func_v
[]
[]
[DomainIntegral]
integrals = 'Jintegral InteractionIntegralKI InteractionIntegralKII'
displacements = 'disp_x disp_y disp_z'
crack_front_points_provider = cut_mesh
crack_direction_method = CurvedCrackFront
radius_inner = 0.42 # to reproduce literature use 0.1
radius_outer = 1.0 # to reproduce literature use 0.3
poissons_ratio = ${poissons}
youngs_modulus = ${youngs}
incremental = false
[]
[Physics/SolidMechanics/QuasiStatic]
[all]
strain = SMALL
incremental = false
generate_output = 'stress_xx stress_yy stress_zz vonmises_stress max_principal_stress'
add_variables = true
[]
[]
[BCs]
[right_x]
type = DirichletBC
boundary = 'right'
variable = disp_x
value = 0
[]
[right_y]
type = DirichletBC
boundary = 'right'
variable = disp_y
value = 0
[]
[right_z]
type = DirichletBC
boundary = 'right'
variable = disp_z
value = 0
[]
[planar_z]
type = DirichletBC
boundary = 'front back'
variable = disp_z
value = 0
[]
[bottom_left_elem_y]
type = NeumannBC
boundary = 'bottom_left_elem'
variable = disp_y
value = -1000
[]
[top_left_elem_y]
type = NeumannBC
boundary = 'top_left_elem'
variable = disp_y
value = 1000
[]
[]
[Materials]
[elasticity_tensor]
type = ComputeIsotropicElasticityTensor
youngs_modulus = ${youngs}
poissons_ratio = ${poissons}
[]
[stress]
type = ComputeLinearElasticStress
[]
[]
[Executioner]
type = Transient
solve_type = 'NEWTON'
petsc_options_iname = '-pc_type -pc_hypre_type -ksp_gmres_restart'
petsc_options_value = 'hypre boomeramg 31'
# petsc_options_iname = '-pc_type -pc_factor_mat_solver_package -pc_factor_shift_type -pc_factor_shift_amount'
# petsc_options_value = ' lu superlu_dist NONZERO 1e-20'
line_search = 'none'
nl_abs_tol = 1e-7
dt = 1.0
end_time = 8 # to reproduce literature use 100
max_xfem_update = 1
[]
[Outputs]
csv = true
execute_on=final
[]
(test/tests/meshgenerators/xy_delaunay_generator/xydelaunay_with_hole_names.i)
[Mesh]
[outer_bdy]
type = PolyLineMeshGenerator
points = '-1.0 0.0 0.0
0.0 -1.0 0.0
1.0 0.0 0.0
0.0 2.0 0.0'
loop = true
[]
[hole_1]
type = PolyLineMeshGenerator
points = '-0.5 -0.1 0.0
-0.3 -0.1 0.0
-0.3 0.1 0.0
-0.5 0.1 0.0'
loop = true
[]
[hole_2]
type = PolyLineMeshGenerator
points = '0.3 -0.1 0.0
0.5 -0.1 0.0
0.5 0.1 0.0
0.3 0.1 0.0'
loop = true
[]
[triang]
type = XYDelaunayGenerator
boundary = 'outer_bdy'
holes = 'hole_1
hole_2'
hole_boundaries = 'left_hole
right_hole'
add_nodes_per_boundary_segment = 3
refine_boundary = false
desired_area = 0.05
[]
[]
(test/tests/meshgenerators/xy_delaunay_generator/xydelaunay_area_func.i)
[Mesh]
[outer_bdy]
type = PolyLineMeshGenerator
points = '-1.0 0.0 0.0
0.0 -1.0 0.0
1.0 0.0 0.0
0.0 2.0 0.0'
loop = true
[]
[hole_1]
type = PolyLineMeshGenerator
points = '-0.5 -0.1 0.0
-0.3 -0.1 0.0
-0.3 0.1 0.0
-0.5 0.1 0.0'
loop = true
[]
[hole_2]
type = PolyLineMeshGenerator
points = '0.3 -0.1 0.0
0.5 -0.1 0.0
0.5 0.1 0.0
0.3 0.1 0.0'
loop = true
[]
[triang]
type = XYDelaunayGenerator
boundary = 'outer_bdy'
holes = 'hole_1
hole_2'
desired_area_func = '(x+1.5)*(y+1.5)*0.01'
[]
[]
(modules/xfem/test/tests/mesh_cut_2D_fracture/double_cantilever_crack_2d.i)
# 2D Double Cantiler beam example.
# Figure 9 in:
# Figure 9 in: Belytschko and Black (1999)
# https://doi.org/10.1002/(SICI)1097-0207(19990620)45:5<601::AID-NME598>3.0.CO;2-S
# to reproduce literature results the mesh must be refined with smaller q-integrals and smaller growth rates
# search comments for "to reproduce literature use"
L = 11.8
W = 3.94
a = 3.94
da = 0.3
dtheta = 5.71 # 1.43, 2.86, 5.71
poissons = 0.3
youngs = 3e7
[GlobalParams]
displacements = 'disp_x disp_y'
volumetric_locking_correction = true
[]
[XFEM]
geometric_cut_userobjects = 'cut_mesh'
qrule = volfrac
output_cut_plane = true
[]
[Mesh]
[cutter_mesh]
type = PolyLineMeshGenerator
points = '-0.01 0 0
${a} 0 0
${fparse a+da*cos(dtheta*pi/180)} ${fparse da*sin(dtheta*pi/180)} 0'
loop = false
num_edges_between_points = 2
save_with_name = cut_mesh
[]
[gen]
type = GeneratedMeshGenerator
dim = 2
nx = 30 # to reproduce literature use 240
ny = 11 # to reproduce literature use 81
xmin = 0
xmax = ${L}
ymin = '-${fparse W/2}'
ymax = '${fparse W/2}'
elem_type = QUAD4
[]
[bottom_left_node]
type = ExtraNodesetGenerator
coord = '0 -${fparse W/2} 0'
input = gen
new_boundary = 'bottom_left_node'
use_closest_node = true
[]
[top_left_node]
type = ExtraNodesetGenerator
coord = '0 ${fparse W/2} 0'
input = bottom_left_node
new_boundary = 'top_left_node'
use_closest_node = true
[]
[bottom_left_elem]
type = ParsedGenerateSideset
input = top_left_node
combinatorial_geometry = 'x < 0.21'
normal = '0 -1 0'
include_only_external_sides=true
new_sideset_name = bottom_left_elem
[]
[top_left_elem]
type = ParsedGenerateSideset
input = bottom_left_elem
combinatorial_geometry = 'x < 0.21'
normal = '0 1 0'
include_only_external_sides=true
new_sideset_name = top_left_elem
[]
final_generator = 'top_left_elem'
[]
[UserObjects]
[cut_mesh]
type = MeshCut2DFractureUserObject
mesh_generator_name = 'cut_mesh'
growth_increment = 0.21 #to reproduce literature use 0.0125
ki_vectorpostprocessor = "II_KI_1"
kii_vectorpostprocessor = "II_KII_1"
k_critical = 0
[]
[]
[DomainIntegral]
integrals = 'Jintegral InteractionIntegralKI InteractionIntegralKII'
displacements = 'disp_x disp_y'
crack_front_points_provider = cut_mesh
2d = true
crack_direction_method = CurvedCrackFront
radius_inner = 0.42 # to reproduce literature use 0.1
radius_outer = 1.0 # to reproduce literature use 0.3
poissons_ratio = ${poissons}
youngs_modulus = ${youngs}
block = 0
incremental = false
[]
[Physics/SolidMechanics/QuasiStatic]
[all]
strain = SMALL
incremental = false
planar_formulation = plane_strain
generate_output = 'stress_xx stress_yy stress_zz vonmises_stress max_principal_stress'
add_variables = true
[]
[]
[BCs]
[right_x]
type = DirichletBC
boundary = 'right'
variable = disp_x
value = 0
[]
[right_y]
type = DirichletBC
boundary = 'right'
variable = disp_y
value = 0
[]
[bottom_left_elem_y]
type = NeumannBC
boundary = 'bottom_left_elem'
variable = disp_y
value = -1000
[]
[top_left_elem_y]
type = NeumannBC
boundary = 'top_left_elem'
variable = disp_y
value = 1000
[]
[]
[Materials]
[elasticity_tensor]
type = ComputeIsotropicElasticityTensor
youngs_modulus = ${youngs}
poissons_ratio = ${poissons}
[]
[stress]
type = ComputeLinearElasticStress
[]
[]
[Executioner]
type = Transient
solve_type = 'NEWTON'
petsc_options_iname = '-pc_type -pc_factor_mat_solver_package -pc_factor_shift_type -pc_factor_shift_amount'
petsc_options_value = ' lu superlu_dist NONZERO 1e-20'
line_search = 'none'
nl_abs_tol = 1e-7
dt = 1.0
end_time = 8 #to reproduce literature use 120
max_xfem_update = 1
[]
[Outputs]
# [xfemcutter]
# type = XFEMCutMeshOutput
# xfem_cutter_uo = cut_mesh
# []
# exodus = true
csv = true
execute_on = final
[]
(test/tests/meshgenerators/polyline_mesh_generator/polyline_mesh_generator_multi_loop_refine.i)
[Mesh]
[poly]
type = PolyLineMeshGenerator
points = '-1.0 0.0 0.0
1.0 1.0 1.0
1.0 2.0 3.0'
loop = true
nums_edges_between_points = '3 4 2'
[]
[]
(test/tests/meshgenerators/xy_delaunay_generator/xydelaunay_bdry_layer.i)
[Mesh]
[outer_bdy]
type = ParsedCurveGenerator
x_formula = 'r*cos(t)'
y_formula = 'r*sin(t)'
section_bounding_t_values = '${fparse 0.0} ${fparse pi} ${fparse 2.0*pi}'
constant_names = 'r'
constant_expressions = '1.0'
nums_segments = '8 12'
is_closed_loop = true
[]
[hole_1]
type = PolyLineMeshGenerator
points = '-0.5 -0.1 0.0
-0.3 -0.1 0.0
-0.3 0.1 0.0
-0.5 0.1 0.0'
loop = true
nums_edges_between_points = 2
[]
[hole_2]
type = GeneratedMeshGenerator
dim = 2
nx = 1
ny = 2
xmin = 0.4
xmax = 0.5
ymin = -0.1
ymax = 0.1
[]
[xyd]
type = XYDelaunayGenerator
boundary = outer_bdy
outer_boundary_layer_thickness = 0.1
outer_boundary_layer_num = 2
outer_boundary_layer_bias = 1.5
holes_boundary_layer_thickness = '0.1 0.15'
holes_boundary_layer_num = '2 3'
holes_boundary_layer_bias = '1.0 1.2'
refine_boundary = false
stitch_holes = 'false true'
refine_holes = 'false false'
holes = 'hole_1 hole_2'
verify_holes = false
output_subdomain_id = 1
output_subdomain_name = 'tri'
[]
[]
[Problem]
solve = false
[]
[AuxVariables]
[unity]
family = MONOMIAL
order = CONSTANT
initial_condition = 1.0
[]
[]
[Executioner]
type = Transient
num_steps = 1
[]
[Postprocessors]
[int_unity_hole_2]
type = ElementIntegralVariablePostprocessor
variable = unity
block = 0
[]
[int_unity_xyd]
type = ElementIntegralVariablePostprocessor
variable = unity
block = 1
[]
[]
[Outputs]
file_base = 'xydelaunay_bdry_layer'
csv = true
execute_on = 'FINAL'
[]
(test/tests/meshgenerators/xy_delaunay_generator/xydelaunay_nested.i)
[Mesh]
[inner_square_sbd_0]
type = GeneratedMeshGenerator
dim = 2
nx = 3
ny = 3
xmin = -0.4
xmax = 0.4
ymin = -0.4
ymax = 0.4
[]
[inner_square]
type = SubdomainIDGenerator
input = inner_square_sbd_0
subdomain_id = 1 # Exodus dislikes quad ids matching tri ids
[]
[layer_2_bdy]
type = PolyLineMeshGenerator
points = '-1.0 0.0 0.0
0.0 -1.0 0.0
1.0 0.0 0.0
0.0 1.0 0.0'
loop = true
[]
[layer_3_bdy]
type = PolyLineMeshGenerator
points = '-1.5 -1.5 0.0
1.5 -1.5 0.0
1.5 1.5 0.0
-1.5 1.5 0.0'
loop = true
[]
[layer_4_bdy]
type = PolyLineMeshGenerator
points = '-4.0 0.0 0.0
0.0 -4.0 0.0
4.0 0.0 0.0
0.0 4.0 0.0'
loop = true
[]
[triang_2]
type = XYDelaunayGenerator
boundary = 'layer_2_bdy'
holes = 'inner_square'
stitch_holes = 'true'
refine_holes = 'false'
verify_holes = false
add_nodes_per_boundary_segment = 2
refine_boundary = false
desired_area = 0.05
[]
[triang_3]
type = XYDelaunayGenerator
boundary = 'layer_3_bdy'
holes = 'triang_2'
stitch_holes = 'true'
refine_holes = 'false'
add_nodes_per_boundary_segment = 2
refine_boundary = false
desired_area = 0.1
[]
[triang_4]
type = XYDelaunayGenerator
boundary = 'layer_4_bdy'
holes = 'triang_3'
stitch_holes = 'true'
refine_holes = 'false'
verify_holes = false
add_nodes_per_boundary_segment = 2
refine_boundary = true
desired_area = 0.2
[]
[]
(test/tests/meshgenerators/xy_delaunay_generator/xydelaunay_auto_area_func.i)
[Mesh]
[outer_bdy]
type = ParsedCurveGenerator
x_formula = 'r*cos(t)'
y_formula = 'r*sin(t)'
section_bounding_t_values = '${fparse 0.0} ${fparse pi} ${fparse 2.0*pi}'
constant_names = 'r'
constant_expressions = '1.0'
nums_segments = '8 16'
is_closed_loop = true
[]
[hole_1]
type = PolyLineMeshGenerator
points = '-0.5 -0.1 0.0
-0.3 -0.1 0.0
-0.3 0.1 0.0
-0.5 0.1 0.0'
loop = true
[]
[hole_2]
type = PolyLineMeshGenerator
points = '0.3 -0.1 0.0
0.5 -0.1 0.0
0.5 0.1 0.0
0.3 0.1 0.0'
loop = true
num_edges_between_points = 3
[]
[triang]
type = XYDelaunayGenerator
boundary = 'outer_bdy'
holes = 'hole_1
hole_2'
refine_boundary = false
refine_holes = "false false"
use_auto_area_func = "true"
[]
[]
[Problem]
solve = false
[]
[AuxVariables]
[quality]
family = MONOMIAL
order = CONSTANT
[]
[]
[AuxKernels]
[qa]
type = ElementQualityAux
variable = quality
metric = SHAPE
[]
[]
[Executioner]
type = Transient
num_steps = 1
[]
[Postprocessors]
[avg_quality]
type = ElementAverageValue
variable = quality
[]
[elem_size]
type = AverageElementSize
[]
[area]
type = VolumePostprocessor
[]
[]
[Outputs]
csv = true
execute_on = 'FINAL'
[]
(test/tests/meshgenerators/xy_delaunay_generator/xydelaunay_multiline.i)
[Mesh]
[line1]
type = PolyLineMeshGenerator
points = '0.0 0.0 0.0
1.0 0.0 0.0'
[]
[line2]
type = PolyLineMeshGenerator
points = '1.0 0.0 0.0
0.0 1.0 0.0'
[]
[outer_bdy]
type = StitchedMeshGenerator
inputs = "line1 line2"
stitch_boundaries_pairs = '2 1'
[]
[triang]
type = XYDelaunayGenerator
boundary = 'outer_bdy'
add_nodes_per_boundary_segment = 4
refine_boundary = false
desired_area = 0.05
[]
[]
(modules/reactor/test/tests/meshgenerators/gap_line_mesh_generator/bdry_gap.i)
[Mesh]
[shape]
type = PolyLineMeshGenerator
points = '0.0 0.0 0.0
1.0 1.0 0.0
0.5 1.5 0.0
2.0 1.5 0.0
2.0 -1.0 0.0
0.5 -1.0 0.0
0.0 -2.0 0.0
-0.5 -1.0 0.0
-2.0 -1.0 0.0
-2.0 1.5 0.0
-0.5 1.5 0.0
-1.0 1.0 0.0'
loop = true
[]
[gmg]
type = GeneratedMeshGenerator
dim = 2
xmin = -3.0
xmax = 3.0
ymin = -3.0
ymax = 3.0
elem_type = QUAD4
[]
[xyd]
type = XYDelaunayGenerator
boundary = 'gmg'
holes = 'shape'
refine_boundary = false
refine_holes = false
[]
[gap]
type = GapLineMeshGenerator
input = 'xyd'
thickness = 0.1
boundary_ids = '1'
gap_direction = INWARD
[]
[]
(test/tests/meshgenerators/xy_delaunay_generator/xydelaunay_stitching.i)
[Mesh]
[outer_bdy]
type = PolyLineMeshGenerator
points = '-1.0 0.0 0.0
0.0 -1.0 0.0
1.0 0.0 0.0
0.0 2.0 0.0'
loop = true
[]
[hole_1]
type = GeneratedMeshGenerator
dim = 2
nx = 3
ny = 3
xmin = -0.5
xmax = -0.3
ymin = -0.1
ymax = 0.1
[]
[hole_1_name]
type = RenameBlockGenerator
input = hole_1
old_block = 0
new_block = hole
[]
[hole_2]
type = GeneratedMeshGenerator
dim = 2
nx = 3
ny = 3
xmin = 0.3
xmax = 0.5
ymin = -0.1
ymax = 0.1
[]
[hole_2_name_1]
type = RenameBlockGenerator
input = hole_2
old_block = 0
new_block = 1
[]
[hole_2_name_2]
type = RenameBlockGenerator
input = hole_2_name_1
old_block = 1
new_block = hole
[]
[triang]
type = XYDelaunayGenerator
boundary = 'outer_bdy'
holes = 'hole_1_name
hole_2'
stitch_holes = 'true
false'
refine_holes = 'false
false'
add_nodes_per_boundary_segment = 3
refine_boundary = false
desired_area = 0.05
output_subdomain_name = "triangles"
[]
[]
(test/tests/meshgenerators/xy_delaunay_generator/xydelaunay_from_2d_bcids.i)
[Mesh]
[left_bdy]
type = PolyLineMeshGenerator
points = '-3.0 0.0 0.0
-2.0 -1.0 0.0
-1.0 0.0 0.0
-2.0 2.0 0.0'
loop = true
[]
[right_bdy]
type = PolyLineMeshGenerator
points = '3.0 0.0 0.0
2.0 -1.0 0.0
1.0 0.0 0.0
2.0 2.0 0.0'
loop = true
[]
[left_2d]
type = XYDelaunayGenerator
boundary = 'left_bdy'
[]
[right_2d]
type = XYDelaunayGenerator
boundary = 'right_bdy'
output_boundary = 'right_outer'
[]
[both_2d]
type = CombinerGenerator
inputs = 'left_2d right_2d'
[]
[triang]
type = XYDelaunayGenerator
boundary = 'both_2d'
input_boundary_names = 'right_outer' # only the right half
refine_boundary = true
desired_area = 0.2
[]
[]
(test/tests/meshgenerators/polyline_mesh_generator/polyline_mesh_generator_good_boundary.i)
[Mesh]
[poly]
type = PolyLineMeshGenerator
points = '-1.0 0.0 0.0
1.0 1.0 1.0
1.0 2.0 3.0'
start_boundary = 'non_numbered'
end_boundary = 42
[]
[]
(modules/reactor/test/tests/meshgenerators/gap_line_mesh_generator/simple_gap.i)
[Mesh]
[shape]
type = PolyLineMeshGenerator
points = '0.0 0.0 0.0
1.0 1.0 0.0
0.5 1.5 0.0
2.0 1.5 0.0
2.0 -1.0 0.0
0.5 -1.0 0.0
0.0 -2.0 0.0
-0.5 -1.0 0.0
-2.0 -1.0 0.0
-2.0 1.5 0.0
-0.5 1.5 0.0
-1.0 1.0 0.0'
loop = true
[]
[xyd]
type = XYDelaunayGenerator
boundary = 'shape'
[]
[gap]
type = GapLineMeshGenerator
input = 'xyd'
thickness = 0.1
[]
[]
(modules/xfem/test/tests/mesh_cut_2D_fracture/inclined_center_crack.i)
# Center inclined crack. To run convergence study, run angles for theta=0-90 and refinement mesh_h=201,401,801
#
# @article{moes1999finite,
# title={A finite element method for crack growth without remeshing},
# author={Mo{\"e}s, Nicolas and Dolbow, John and Belytschko, Ted},
# journal={International journal for numerical methods in engineering},
# volume={46},
# number={1},
# pages={131--150},
# year={1999},
# publisher={Wiley Online Library}
# }
# @article{richardson2011xfem,
# title={An XFEM method for modeling geometrically elaborate crack propagation in brittle materials},
# author={Richardson, Casey L and Hegemann, Jan and Sifakis, Eftychios and Hellrung, Jeffrey and Teran, Joseph M},
# journal={International Journal for Numerical Methods in Engineering},
# volume={88},
# number={10},
# pages={1042--1065},
# year={2011},
# publisher={Wiley Online Library}
# }
H = 40
W = 40
a = 1
theta = 20 #measured from x-axis
poissons = 0.3
youngs = 30e6
stress_load = 10000
mesh_h=201
[GlobalParams]
displacements = 'disp_x disp_y'
volumetric_locking_correction = true
[]
[Mesh]
[cutter_mesh]
type = PolyLineMeshGenerator
points = '-${fparse a*cos(theta*pi/180)} -${fparse a*sin(theta*pi/180)} 0
${fparse a*cos(theta*pi/180)} ${fparse a*sin(theta*pi/180)} 0'
loop = false
num_edges_between_points = 2
save_with_name = cut_mesh
[]
[gen]
type = GeneratedMeshGenerator
dim = 2
nx = ${mesh_h}
ny = ${mesh_h}
xmin = -${fparse W/2}
xmax = ${fparse W/2}
ymin = -${fparse H/2}
ymax = ${fparse H/2}
elem_type = QUAD4
[]
[center_block]
type = SubdomainBoundingBoxGenerator
input = gen
block_id = 10
bottom_left = '-${fparse 1.5*a} -${fparse 1.5*a} 0'
top_right = '${fparse 1.5*a} ${fparse 1.5*a} 0'
[]
[center_left_node]
type = ExtraNodesetGenerator
coord = '-${fparse W/2} 0 0'
input = gen
new_boundary = 'center_left_node'
use_closest_node = true
[]
[center_right_node]
type = ExtraNodesetGenerator
coord = '${fparse W/2} 0 0'
input = center_left_node
new_boundary = 'center_right_node'
use_closest_node = true
[]
final_generator = 'center_right_node'
[]
#### - adaptivity causes segfault, see #31714
# [AuxVariables]
# [constant_refine]
# initial_condition = 2
# order = CONSTANT
# family = MONOMIAL
# block = 10
# []
# []
# [Adaptivity]
# initial_marker = constant_refine
# max_h_level = 2
# initial_steps = 2
# []
[XFEM]
geometric_cut_userobjects = 'cut_mesh'
qrule = volfrac
output_cut_plane = true
[]
[UserObjects]
[cut_mesh]
type = MeshCut2DFractureUserObject
mesh_generator_name = 'cut_mesh'
growth_increment = 0.05
ki_vectorpostprocessor = "II_KI_1"
kii_vectorpostprocessor = "II_KII_1"
k_critical = 1000 # big, don't want to grow
[]
[]
[DomainIntegral]
integrals = 'Jintegral InteractionIntegralKI InteractionIntegralKII'
displacements = 'disp_x disp_y'
crack_front_points_provider = cut_mesh
2d = true
number_points_from_provider = 2
crack_direction_method = CurvedCrackFront
radius_inner = '0.2'
radius_outer = '0.8'
poissons_ratio = ${poissons}
youngs_modulus = ${youngs}
block = 0
incremental = false
[]
[Physics/SolidMechanics/QuasiStatic]
[all]
strain = SMALL
incremental = false
planar_formulation = plane_strain
generate_output = 'stress_xx stress_yy stress_zz vonmises_stress max_principal_stress'
add_variables = true
[]
[]
[Postprocessors]
[theta]
type = ConstantPostprocessor
value = ${theta}
[]
[stress_load]
type = ConstantPostprocessor
value = ${stress_load}
[]
[ki_analytic]
type = ParsedPostprocessor
expression = '(${fparse stress_load*sqrt(pi*a)*cos(theta*pi/180)*cos(theta*pi/180)})'
[]
[kii_analytic]
type = ParsedPostprocessor
expression = '(${fparse stress_load*sqrt(pi*a)*cos(theta*pi/180)*sin(theta*pi/180)})'
[]
[]
[BCs]
[left_x]
type = DirichletBC
boundary = 'center_left_node'
variable = disp_x
value = 0
[]
[left_y]
type = DirichletBC
boundary = 'center_left_node'
variable = disp_y
value = 0
[]
[right_y]
type = DirichletBC
boundary = 'center_right_node'
variable = disp_y
value = 0
[]
[bottom_load]
type = NeumannBC
boundary = 'bottom'
variable = disp_y
value = -${stress_load}
[]
[top_load]
type = NeumannBC
boundary = 'top'
variable = disp_y
value = ${stress_load}
[]
[]
[Materials]
[elasticity_tensor]
type = ComputeIsotropicElasticityTensor
youngs_modulus = ${youngs}
poissons_ratio = ${poissons}
[]
[stress]
type = ComputeLinearElasticStress
[]
[]
[Executioner]
type = Transient
solve_type = 'NEWTON'
petsc_options_iname = '-pc_type -pc_factor_mat_solver_package -pc_factor_shift_type -pc_factor_shift_amount'
petsc_options_value = ' lu superlu_dist NONZERO 1e-20'
line_search = 'none'
nl_abs_tol = 1e-7
start_time = 0.0
dt = 1.0
end_time = 1
max_xfem_update = 0
[]
[Outputs]
csv = true
# uncomment for convergence study
# file_base = inclined_crack/results_theta_${theta}_h_${mesh_h}
[]
(test/tests/meshgenerators/xy_delaunay_generator/xydelaunay_from_1d_sbdids.i)
[Mesh]
[left_bdy]
type = PolyLineMeshGenerator
points = '-3.0 0.0 0.0
-2.0 -1.0 0.0
-1.0 0.0 0.0
-2.0 2.0 0.0'
loop = true
[]
[right_bdy]
type = PolyLineMeshGenerator
points = '3.0 0.0 0.0
2.0 -1.0 0.0
1.0 0.0 0.0
2.0 2.0 0.0'
loop = true
[]
[right_sbd1]
type = SubdomainIDGenerator
input = right_bdy
subdomain_id = 1
[]
[both_bdy]
type = CombinerGenerator
inputs = 'left_bdy right_sbd1'
[]
[triang]
type = XYDelaunayGenerator
boundary = 'both_bdy'
input_subdomain_names = 1 # only the right half
refine_boundary = true
desired_area = 0.2
[]
[]
(test/tests/meshgenerators/xy_delaunay_generator/xydelaunay_interior_pts.i)
[Mesh]
[outer_bdy]
type = PolyLineMeshGenerator
points = '0.0 0.0 0.0
0.5 0.0 0.0
1.0 0.0 0.0
1.0 0.5 0.0
1.0 0.75 0.0
1.0 0.875 0.0
1.0 1.0 0.0
0.875 1.0 0.0
0.75 1.0 0.0
0.5 1.0 0.0
0.0 1.0 0.0
0.0 0.5 0.0'
loop = true
[]
[triangulate]
type = XYDelaunayGenerator
boundary = 'outer_bdy'
interior_points = '0.5 0.5 0
0.5 0.75 0
0.75 0.5 0
0.75 0.75 0
0.75 0.875 0
0.875 0.75 0
0.875 0.875 0'
interior_point_files = 'extra_points.csv'
[]
[]
[Problem]
solve = false
[]
[Executioner]
type = Steady
[]
[Outputs]
exodus = true
execute_on = TIMESTEP_END
[]
(test/tests/meshmodifiers/move_nodes_to_sphere/block.i)
[Mesh]
[gen]
type = PolyLineMeshGenerator
points = "0 0 0
0 1 0
1 1 0
1 0 0"
loop = true
[]
[]
[Variables]
[u]
initial_condition = 1
[]
[]
[Problem]
kernel_coverage_check = false
solve = false
[]
[Executioner]
type = Steady
[]
[UserObjects]
[sphere]
type = GeometrySphere
center = '0.5 0.5 0'
radius = 0.7071
block = 0
[]
[]
[Adaptivity]
[Markers]
[const]
type = UniformMarker
mark = REFINE
[]
[]
marker = const
steps = 3
[]
[Outputs]
[out]
type = Exodus
[]
[]
(modules/reactor/test/tests/meshgenerators/peripheral_ring_mesh_generator/err_mix_type.i)
[Mesh]
[obdry_1]
type = PolyLineMeshGenerator
points = '-1 0 0
0 0 0
0 1 0
-1 1 0'
loop = true
num_edges_between_points = 2
[]
[tri_1]
type = XYDelaunayGenerator
boundary = 'obdry_1'
refine_boundary = false
output_subdomain_name = 1
output_boundary = 10
[]
[obdry_2]
type = PolyLineMeshGenerator
points = '1 0 0
0 0 0
0 1 0
1 1 0'
loop = true
num_edges_between_points = 1
[]
[tri_2]
type = XYDelaunayGenerator
boundary = 'obdry_2'
refine_boundary = false
output_subdomain_name = 2
output_boundary = 10
[]
[convert]
type = ElementOrderConversionGenerator
input = tri_2
conversion_type = SECOND_ORDER
[]
[smg]
type = StitchedMeshGenerator
inputs = 'tri_1 convert'
stitch_boundaries_pairs = '10 10'
parallel_type = 'replicated'
prevent_boundary_ids_overlap = false
[]
[pr]
type = PeripheralRingMeshGenerator
input = smg
peripheral_layer_num = 4
peripheral_ring_radius = 15
input_mesh_external_boundary = 10
peripheral_ring_block_id = 250
peripheral_ring_block_name = reactor_ring
[]
[]
(test/tests/meshgenerators/polyline_mesh_generator/polyline_mesh_generator_bad_boundary.i)
[Mesh]
[poly]
type = PolyLineMeshGenerator
points = '-1.0 0.0 0.0
1.0 1.0 1.0
1.0 2.0 3.0'
# This should error for 16-bit boundary id configs:
start_boundary = 40000
# This should error even for 64-bit boundary id configs:
end_boundary = 123456789012345678901234567890
[]
[]
(test/tests/meshgenerators/xy_delaunay_generator/xydelaunay_mesh_generator.i)
[Mesh]
[outer_bdy]
type = PolyLineMeshGenerator
points = '-1.0 0.0 0.0
0.0 -1.0 0.0
1.0 0.0 0.0
0.0 2.0 0.0'
loop = true
[]
[triang]
type = XYDelaunayGenerator
boundary = 'outer_bdy'
add_nodes_per_boundary_segment = 3
refine_boundary = false
desired_area = 0.05
[]
[]
(test/tests/meshgenerators/polyline_mesh_generator/polyline_mesh_generator_loop.i)
[Mesh]
[poly]
type = PolyLineMeshGenerator
points = '-1.0 0.0 0.0
1.0 1.0 1.0
1.0 2.0 3.0'
loop = true
[]
[]
(test/tests/meshgenerators/polyline_mesh_generator/polyline_mesh_generator.i)
[Mesh]
[poly]
type = PolyLineMeshGenerator
points = '-1.0 0.0 0.0
1.0 1.0 1.0
1.0 2.0 3.0'
[]
[]
(test/tests/meshgenerators/xy_delaunay_generator/xydelaunay_smoothed.i)
[Mesh]
[inner_square_sbd_0]
type = GeneratedMeshGenerator
dim = 2
nx = 3
ny = 3
xmin = -0.4
xmax = 0.4
ymin = -0.4
ymax = 0.4
[]
[inner_square]
type = SubdomainIDGenerator
input = inner_square_sbd_0
subdomain_id = 1 # Exodus dislikes quad ids matching tri ids
[]
[layer_2_bdy]
type = PolyLineMeshGenerator
points = '-1.0 0.0 0.0
0.0 -1.0 0.0
1.0 0.0 0.0
0.0 1.0 0.0'
loop = true
[]
[layer_3_bdy]
type = PolyLineMeshGenerator
points = '-1.5 -1.5 0.0
1.5 -1.5 0.0
1.5 1.5 0.0
-1.5 1.5 0.0'
loop = true
[]
[layer_4_bdy]
type = PolyLineMeshGenerator
points = '-4.0 0.0 0.0
0.0 -4.0 0.0
4.0 0.0 0.0
0.0 4.0 0.0'
loop = true
[]
[triang_2]
type = XYDelaunayGenerator
boundary = 'layer_2_bdy'
holes = 'inner_square'
stitch_holes = 'true'
refine_holes = 'false'
add_nodes_per_boundary_segment = 2
refine_boundary = false
desired_area = 0.05
smooth_triangulation = true
[]
[triang_3]
type = XYDelaunayGenerator
boundary = 'layer_3_bdy'
holes = 'triang_2'
stitch_holes = 'true'
refine_holes = 'false'
add_nodes_per_boundary_segment = 2
refine_boundary = false
desired_area = 0.1
# smooth_triangulation = false # default
[]
[triang_4]
type = XYDelaunayGenerator
boundary = 'layer_4_bdy'
holes = 'triang_3'
stitch_holes = 'true'
refine_holes = 'false'
add_nodes_per_boundary_segment = 2
refine_boundary = true
desired_area = 0.2
smooth_triangulation = true
[]
[]
(test/tests/meshgenerators/polyline_mesh_generator/polyline_mesh_generator_refine.i)
[Mesh]
[poly]
type = PolyLineMeshGenerator
points = '-1.0 0.0 0.0
1.0 1.0 1.0
1.0 2.0 3.0'
nums_edges_between_points = 4
[]
[]