only statevar 2 is used for material definition

This commit is contained in:
Franz Roters 2020-09-07 17:01:38 +02:00
parent de4587c52e
commit 44f5f2cc01
3 changed files with 5 additions and 12 deletions

Binary file not shown.

View File

@ -130,7 +130,7 @@ def geometry():
#------------------------------------------------------------------------------------------------- #-------------------------------------------------------------------------------------------------
def initial_conditions(homogenization,microstructures): def initial_conditions(microstructures):
elements = [] elements = []
element = 0 element = 0
for id in microstructures: for id in microstructures:
@ -148,13 +148,6 @@ def initial_conditions(homogenization,microstructures):
"*icond_dof_value var 300", "*icond_dof_value var 300",
"*add_icond_elements", "*add_icond_elements",
"all_existing", "all_existing",
"*new_icond",
"*icond_name _homogenization",
"*icond_type state_variable",
"*icond_param_value state_var_id 2",
"*icond_dof_value var %i"%homogenization,
"*add_icond_elements",
"all_existing",
] ]
for grain,elementList in enumerate(elements): for grain,elementList in enumerate(elements):
@ -162,7 +155,7 @@ def initial_conditions(homogenization,microstructures):
"*new_icond", "*new_icond",
"*icond_name microstructure_%i"%(grain+1), "*icond_name microstructure_%i"%(grain+1),
"*icond_type state_variable", "*icond_type state_variable",
"*icond_param_value state_var_id 3", "*icond_param_value state_var_id 2",
"*icond_dof_value var %i"%(grain+1), "*icond_dof_value var %i"%(grain+1),
"*add_icond_elements", "*add_icond_elements",
elementList, elementList,
@ -211,7 +204,7 @@ for name in filenames:
mesh(geom.grid,geom.size), mesh(geom.grid,geom.size),
material(), material(),
geometry(), geometry(),
initial_conditions(geom.homogenization,microstructure), initial_conditions(microstructure),
'*identify_sets', '*identify_sets',
'*show_model', '*show_model',
'*redraw', '*redraw',

View File

@ -706,7 +706,7 @@ subroutine inputRead_microstructure(microstructureAt,&
k = merge(2,1,initialcondTableStyle == 2) k = merge(2,1,initialcondTableStyle == 2)
chunkPos = IO_stringPos(fileContent(l+k)) chunkPos = IO_stringPos(fileContent(l+k))
sv = IO_IntValue(fileContent(l+k),chunkPos,1) ! figure state variable index sv = IO_IntValue(fileContent(l+k),chunkPos,1) ! figure state variable index
if( (sv == 2) .or. (sv == 3) ) then ! only state vars 2 and 3 of interest if( (sv == 2)) then ! state var 2 is used to identify material from material.yaml
m = 1 m = 1
chunkPos = IO_stringPos(fileContent(l+k+m)) chunkPos = IO_stringPos(fileContent(l+k+m))
do while (scan(IO_stringValue(fileContent(l+k+m),chunkPos,1),'+-',back=.true.)>1) ! is noEfloat value? do while (scan(IO_stringValue(fileContent(l+k+m),chunkPos,1),'+-',back=.true.)>1) ! is noEfloat value?
@ -715,7 +715,7 @@ subroutine inputRead_microstructure(microstructureAt,&
contInts = continuousIntValues(fileContent(l+k+m+1:),nElem,nameElemSet,mapElemSet,size(nameElemSet)) ! get affected elements contInts = continuousIntValues(fileContent(l+k+m+1:),nElem,nameElemSet,mapElemSet,size(nameElemSet)) ! get affected elements
do i = 1,contInts(1) do i = 1,contInts(1)
e = mesh_FEM2DAMASK_elem(contInts(1+i)) e = mesh_FEM2DAMASK_elem(contInts(1+i))
if (sv == 3) microstructureAt(e) = myVal microstructureAt(e) = myVal
enddo enddo
if (initialcondTableStyle == 0) m = m + 1 if (initialcondTableStyle == 0) m = m + 1
enddo enddo