corrected and adapted script for Marc2023.x

This commit is contained in:
Franz Roters 2023-10-27 17:18:02 +02:00
parent 2a00de5fbb
commit f67660902c
1 changed files with 16 additions and 18 deletions

View File

@ -65,13 +65,13 @@ def mesh(r,d):
return [ return [
"*add_nodes", "*add_nodes",
"%f %f %f"%(0.0,0.0,0.0), "%f %f %f"%(0.0,0.0,0.0),
"%f %f %f"%(0.0,0.0,d[2]), "%f %f %f"%(d[0],0.0,0.0),
"%f %f %f"%(0.0,d[1],d[2]), "%f %f %f"%(d[0],d[1],0.0),
"%f %f %f"%(0.0,d[1],0.0), "%f %f %f"%(0.0,d[1],0.0),
"%f %f %f"%(-d[0],0.0,0.0), "%f %f %f"%(0.0,0.0,d[2]),
"%f %f %f"%(-d[0],0.0,d[2]), "%f %f %f"%(d[0],0.0,d[2]),
"%f %f %f"%(-d[0],d[1],d[2]), "%f %f %f"%(d[0],d[1],d[2]),
"%f %f %f"%(-d[0],d[1],0.0), "%f %f %f"%(0.0,d[1],d[2]),
"*add_elements", "*add_elements",
"1", "1",
"2", "2",
@ -82,19 +82,17 @@ def mesh(r,d):
"7", "7",
"8", "8",
"*sub_divisions", "*sub_divisions",
"%i %i %i"%(r[2],r[1],r[0]), "%i %i %i"%(r[0],r[1],r[2]),
"*subdivide_elements", "*subdivide_elements",
"all_existing", "all_existing",
"*set_sweep_tolerance", "*set_sweep_tolerance",
"%f"%(float(min(d))/max(r)/2.0), "%f"%(float(min(d))/max(r)/2.0),
"*sweep_all", "*sweep_all",
"*renumber_all", "*remove_unused_nodes",
"*set_move_scale_factor x -1", "*set_renumber_direction",
"*move_elements", "%i %i %i"%(1,r[0],r[0]*r[1]),
"all_existing", "*renumber_elements_directed",
"*flip_elements", "*renumber_nodes_directed",
"all_existing",
"*fill_view",
] ]
@ -142,8 +140,7 @@ def initial_conditions(material):
cmds = [\ cmds = [\
"*new_icond", "*new_icond",
"*icond_name _temperature", "*icond_name _temperature",
"*icond_type state_variable", "*icond_type elem_temperature_state",
"*icond_param_value state_var_id 1",
"*icond_dof_value var 300", "*icond_dof_value var 300",
"*add_icond_elements", "*add_icond_elements",
"all_existing", "all_existing",
@ -153,9 +150,9 @@ def initial_conditions(material):
cmds.append([\ cmds.append([\
"*new_icond", "*new_icond",
"*icond_name material_%i"%(grain+1), "*icond_name material_%i"%(grain+1),
"*icond_type state_variable", "*icond_type elem_user_state",
"*icond_param_value state_var_id 2", "*icond_param_value state_var_id 2",
"*icond_dof_value var %i"%(grain+1), "*icond_dof_value var %i"%(grain),
"*add_icond_elements", "*add_icond_elements",
elementList, elementList,
"#", "#",
@ -209,6 +206,7 @@ for name in filenames:
'*show_model', '*show_model',
'*redraw', '*redraw',
'*draw_automatic', '*draw_automatic',
'*fill_view',
] ]
output_locals = {} output_locals = {}