specify solver,initial and boundary conditions in load file

This commit is contained in:
Sharan Roongta 2021-02-05 01:31:41 +01:00
parent 2e173b4b7b
commit a1a7a339d4
5 changed files with 60 additions and 34 deletions

@ -1 +1 @@
Subproject commit 2b3f72505785d717860ab0012da8bc21c7fb61ed Subproject commit 1c2dd13c9aea21d341e579fe66e4bef5c48ce07e

View File

@ -1,9 +1,18 @@
step: ---
- mechanics:
dot_F: [0, 0, 0, solver:
1e-3, 0, 0, mechanical: spectral_basic
0, 0, 0]
initial_conditions:
T: 300 #in Kelvin
loadstep:
- boundary_conditions:
mechanical:
dot_F: [0, 0, 0,
1e-3, 0, 0,
0, 0, 0]
discretization: discretization:
t: 60 t: 60
N: 120 N: 120
f_out: 20 f_out: 20

View File

@ -1,10 +1,18 @@
--- ---
step:
- mechanics: solver:
dot_F: [0, 0, 1e-3, mechanical: spectral_basic
0, 0, 0,
0, 0, 0] initial_conditions:
T: 300 #in Kelvin
loadstep:
- boundary_conditions:
mechanical:
dot_F: [0, 0, 1e-3,
0, 0, 0,
0, 0, 0]
discretization: discretization:
t: 60 t: 60
N: 120 N: 120
f_out: 20 f_out: 20

View File

@ -1,25 +1,33 @@
--- ---
step: solver:
- mechanics: mechanical: spectral_basic
dot_F: [1.0e-3, 0, 0,
0, x, 0, initial_conditions:
0, 0, x] T: 300 #in Kelvin
P: [x, x, x,
x, 0, x, loadstep:
x, x, 0] - boundary_conditions:
mechanical:
dot_F: [1.0e-3, 0, 0,
0, x, 0,
0, 0, x]
P: [x, x, x,
x, 0, x,
x, x, 0]
discretization: discretization:
t: 10 t: 10
N: 40 N: 40
f_out: 4 f_out: 4
- mechanics: - boundary_conditions:
dot_F: [1.0e-3, 0, 0, mechanical:
0, x, 0, dot_F: [1.0e-3, 0, 0,
0, 0, x] 0, x, 0,
P: [x, x, x, 0, 0, x]
x, 0, x, P: [x, x, x,
x, x, 0] x, 0, x,
x, x, 0]
discretization: discretization:
t: 60 t: 60
N: 60 N: 60
f_out: 4 f_out: 4

View File

@ -102,6 +102,7 @@ program DAMASK_grid
config_load, & config_load, &
load_steps, & load_steps, &
load_step, & load_step, &
step_bc, &
step_mech, & step_mech, &
step_discretization, & step_discretization, &
step_deformation, & step_deformation, &
@ -168,7 +169,7 @@ program DAMASK_grid
! reading information from load case file and to sanity checks ! reading information from load case file and to sanity checks
config_load => YAML_parse_file(trim(interface_loadFile)) config_load => YAML_parse_file(trim(interface_loadFile))
load_steps => config_load%get('step') load_steps => config_load%get('loadstep')
allocate(loadCases(load_steps%length)) ! array of load cases allocate(loadCases(load_steps%length)) ! array of load cases
do l = 1, load_steps%length do l = 1, load_steps%length
@ -186,8 +187,8 @@ program DAMASK_grid
endif damageActive endif damageActive
load_step => load_steps%get(l) load_step => load_steps%get(l)
step_bc => load_step%get('boundary_conditions')
step_mech => load_step%get('mechanics') step_mech => step_bc%get('mechanical')
loadCases(l)%stress%myType='' loadCases(l)%stress%myType=''
readMech: do m = 1, step_mech%length readMech: do m = 1, step_mech%length
select case (step_mech%getKey(m)) select case (step_mech%getKey(m))
@ -224,9 +225,9 @@ program DAMASK_grid
loadCases(l)%t = step_discretization%get_asFloat('t') loadCases(l)%t = step_discretization%get_asFloat('t')
loadCases(l)%N = step_discretization%get_asInt ('N') loadCases(l)%N = step_discretization%get_asInt ('N')
loadCases(l)%r = step_discretization%get_asFloat('r', defaultVal= 1.0_pReal) loadCases(l)%r = step_discretization%get_asFloat('r', defaultVal= 1.0_pReal)
loadCases(l)%f_out = step_discretization%get_asInt ('f_out', defaultVal=1)
loadCases(l)%f_restart = step_discretization%get_asInt ('f_restart', defaultVal=huge(0)) loadCases(l)%f_restart = step_discretization%get_asInt ('f_restart', defaultVal=huge(0))
loadCases(l)%f_out = load_step%get_asInt('f_out', defaultVal=1)
loadCases(l)%drop_guessing = (.not. load_step%get_asBool('estimate_rate',defaultVal=.true.) .or. & !ToDO: SR: simplify logic later,change name loadCases(l)%drop_guessing = (.not. load_step%get_asBool('estimate_rate',defaultVal=.true.) .or. & !ToDO: SR: simplify logic later,change name
merge(.false.,.true.,l > 1)) merge(.false.,.true.,l > 1))