Merge branch 'corrected-legacy-script' into 'development'

corrected and adapted script for Marc2023.x

See merge request damask/DAMASK!846
This commit is contained in:
Martin Diehl 2023-11-14 10:16:55 +00:00
commit cc6f2250d3
1 changed files with 16 additions and 18 deletions

View File

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