improved sanity checks, mainly for RGC
This commit is contained in:
parent
af075aaa9d
commit
d595f59f0e
|
@ -151,8 +151,8 @@ subroutine constitutive_j2_init(fileUnit)
|
||||||
if (iand(debug_level(debug_constitutive),debug_levelBasic) /= 0_pInt) &
|
if (iand(debug_level(debug_constitutive),debug_levelBasic) /= 0_pInt) &
|
||||||
write(6,'(a16,1x,i5,/)') '# instances:',maxNinstance
|
write(6,'(a16,1x,i5,/)') '# instances:',maxNinstance
|
||||||
|
|
||||||
allocate(constitutive_j2_sizeDotState(maxNinstance), source=0_pInt)
|
allocate(constitutive_j2_sizeDotState(maxNinstance), source=1_pInt)
|
||||||
allocate(constitutive_j2_sizeState(maxNinstance), source=0_pInt)
|
allocate(constitutive_j2_sizeState(maxNinstance), source=1_pInt)
|
||||||
allocate(constitutive_j2_sizePostResults(maxNinstance), source=0_pInt)
|
allocate(constitutive_j2_sizePostResults(maxNinstance), source=0_pInt)
|
||||||
allocate(constitutive_j2_sizePostResult(maxval(phase_Noutput), maxNinstance),source=0_pInt)
|
allocate(constitutive_j2_sizePostResult(maxval(phase_Noutput), maxNinstance),source=0_pInt)
|
||||||
allocate(constitutive_j2_output(maxval(phase_Noutput), maxNinstance))
|
allocate(constitutive_j2_output(maxval(phase_Noutput), maxNinstance))
|
||||||
|
@ -198,7 +198,6 @@ subroutine constitutive_j2_init(fileUnit)
|
||||||
tag = IO_lc(IO_stringValue(line,positions,1_pInt)) ! extract key
|
tag = IO_lc(IO_stringValue(line,positions,1_pInt)) ! extract key
|
||||||
select case(tag)
|
select case(tag)
|
||||||
case ('plasticity','elasticity')
|
case ('plasticity','elasticity')
|
||||||
cycle
|
|
||||||
case ('(output)')
|
case ('(output)')
|
||||||
constitutive_j2_Noutput(i) = constitutive_j2_Noutput(i) + 1_pInt
|
constitutive_j2_Noutput(i) = constitutive_j2_Noutput(i) + 1_pInt
|
||||||
constitutive_j2_output(constitutive_j2_Noutput(i),i) = &
|
constitutive_j2_output(constitutive_j2_Noutput(i),i) = &
|
||||||
|
@ -245,16 +244,24 @@ subroutine constitutive_j2_init(fileUnit)
|
||||||
constitutive_j2_Cslip_66(6,6,i) = IO_floatValue(line,positions,2_pInt)
|
constitutive_j2_Cslip_66(6,6,i) = IO_floatValue(line,positions,2_pInt)
|
||||||
case ('tau0')
|
case ('tau0')
|
||||||
constitutive_j2_tau0(i) = IO_floatValue(line,positions,2_pInt)
|
constitutive_j2_tau0(i) = IO_floatValue(line,positions,2_pInt)
|
||||||
|
if (constitutive_j2_tau0(i) < 0.0_pReal) &
|
||||||
|
call IO_error(211_pInt,ext_msg=trim(tag)//' ('//PLASTICITY_J2_label//')')
|
||||||
case ('gdot0')
|
case ('gdot0')
|
||||||
constitutive_j2_gdot0(i) = IO_floatValue(line,positions,2_pInt)
|
constitutive_j2_gdot0(i) = IO_floatValue(line,positions,2_pInt)
|
||||||
|
if (constitutive_j2_gdot0(i) <= 0.0_pReal) &
|
||||||
|
call IO_error(211_pInt,ext_msg=trim(tag)//' ('//PLASTICITY_J2_label//')')
|
||||||
case ('n')
|
case ('n')
|
||||||
constitutive_j2_n(i) = IO_floatValue(line,positions,2_pInt)
|
constitutive_j2_n(i) = IO_floatValue(line,positions,2_pInt)
|
||||||
|
if (constitutive_j2_n(i) <= 0.0_pReal) &
|
||||||
|
call IO_error(211_pInt,ext_msg=trim(tag)//' ('//PLASTICITY_J2_label//')')
|
||||||
case ('h0')
|
case ('h0')
|
||||||
constitutive_j2_h0(i) = IO_floatValue(line,positions,2_pInt)
|
constitutive_j2_h0(i) = IO_floatValue(line,positions,2_pInt)
|
||||||
case ('h0_slope','slopelnrate')
|
case ('h0_slope','slopelnrate')
|
||||||
constitutive_j2_h0_slopeLnRate(i) = IO_floatValue(line,positions,2_pInt)
|
constitutive_j2_h0_slopeLnRate(i) = IO_floatValue(line,positions,2_pInt)
|
||||||
case ('tausat')
|
case ('tausat')
|
||||||
constitutive_j2_tausat(i) = IO_floatValue(line,positions,2_pInt)
|
constitutive_j2_tausat(i) = IO_floatValue(line,positions,2_pInt)
|
||||||
|
if (constitutive_j2_tausat(i) <= 0.0_pReal) &
|
||||||
|
call IO_error(211_pInt,ext_msg=trim(tag)//' ('//PLASTICITY_J2_label//')')
|
||||||
case ('tausat_sinhfita')
|
case ('tausat_sinhfita')
|
||||||
constitutive_j2_tausat_SinhFitA(i) = IO_floatValue(line,positions,2_pInt)
|
constitutive_j2_tausat_SinhFitA(i) = IO_floatValue(line,positions,2_pInt)
|
||||||
case ('tausat_sinhfitb')
|
case ('tausat_sinhfitb')
|
||||||
|
@ -265,10 +272,16 @@ subroutine constitutive_j2_init(fileUnit)
|
||||||
constitutive_j2_tausat_SinhFitD(i) = IO_floatValue(line,positions,2_pInt)
|
constitutive_j2_tausat_SinhFitD(i) = IO_floatValue(line,positions,2_pInt)
|
||||||
case ('a', 'w0')
|
case ('a', 'w0')
|
||||||
constitutive_j2_a(i) = IO_floatValue(line,positions,2_pInt)
|
constitutive_j2_a(i) = IO_floatValue(line,positions,2_pInt)
|
||||||
|
if (constitutive_j2_a(i) <= 0.0_pReal) &
|
||||||
|
call IO_error(211_pInt,ext_msg=trim(tag)//' ('//PLASTICITY_J2_label//')')
|
||||||
case ('taylorfactor')
|
case ('taylorfactor')
|
||||||
constitutive_j2_fTaylor(i) = IO_floatValue(line,positions,2_pInt)
|
constitutive_j2_fTaylor(i) = IO_floatValue(line,positions,2_pInt)
|
||||||
|
if (constitutive_j2_fTaylor(i) <= 0.0_pReal) &
|
||||||
|
call IO_error(211_pInt,ext_msg=trim(tag)//' ('//PLASTICITY_J2_label//')')
|
||||||
case ('atol_resistance')
|
case ('atol_resistance')
|
||||||
constitutive_j2_aTolResistance(i) = IO_floatValue(line,positions,2_pInt)
|
constitutive_j2_aTolResistance(i) = IO_floatValue(line,positions,2_pInt)
|
||||||
|
if (constitutive_j2_aTolResistance(i) <= 0.0_pReal) &
|
||||||
|
call IO_error(211_pInt,ext_msg=trim(tag)//' ('//PLASTICITY_J2_label//')')
|
||||||
case default
|
case default
|
||||||
call IO_error(210_pInt,ext_msg=trim(tag)//' ('//PLASTICITY_J2_label//')')
|
call IO_error(210_pInt,ext_msg=trim(tag)//' ('//PLASTICITY_J2_label//')')
|
||||||
end select
|
end select
|
||||||
|
@ -276,23 +289,6 @@ subroutine constitutive_j2_init(fileUnit)
|
||||||
endif
|
endif
|
||||||
enddo
|
enddo
|
||||||
|
|
||||||
sanityChecks: do i = 1_pInt,maxNinstance
|
|
||||||
if (constitutive_j2_tau0(i) < 0.0_pReal) call IO_error(211_pInt,ext_msg='tau0 (' &
|
|
||||||
//PLASTICITY_J2_label//')')
|
|
||||||
if (constitutive_j2_gdot0(i) <= 0.0_pReal) call IO_error(211_pInt,ext_msg='gdot0 (' &
|
|
||||||
//PLASTICITY_J2_label//')')
|
|
||||||
if (constitutive_j2_n(i) <= 0.0_pReal) call IO_error(211_pInt,ext_msg='n (' &
|
|
||||||
//PLASTICITY_J2_label//')')
|
|
||||||
if (constitutive_j2_tausat(i) <= 0.0_pReal) call IO_error(211_pInt,ext_msg='tausat (' &
|
|
||||||
//PLASTICITY_J2_label//')')
|
|
||||||
if (constitutive_j2_a(i) <= 0.0_pReal) call IO_error(211_pInt,ext_msg='a (' &
|
|
||||||
//PLASTICITY_J2_label//')')
|
|
||||||
if (constitutive_j2_fTaylor(i) <= 0.0_pReal) call IO_error(211_pInt,ext_msg='taylorfactor (' &
|
|
||||||
//PLASTICITY_J2_label//')')
|
|
||||||
if (constitutive_j2_aTolResistance(i) <= 0.0_pReal) call IO_error(211_pInt,ext_msg='aTol_resistance (' &
|
|
||||||
//PLASTICITY_J2_label//')')
|
|
||||||
enddo sanityChecks
|
|
||||||
|
|
||||||
instancesLoop: do i = 1_pInt,maxNinstance
|
instancesLoop: do i = 1_pInt,maxNinstance
|
||||||
outputsLoop: do o = 1_pInt,constitutive_j2_Noutput(i)
|
outputsLoop: do o = 1_pInt,constitutive_j2_Noutput(i)
|
||||||
select case(constitutive_j2_outputID(o,i))
|
select case(constitutive_j2_outputID(o,i))
|
||||||
|
@ -308,14 +304,10 @@ subroutine constitutive_j2_init(fileUnit)
|
||||||
endif
|
endif
|
||||||
enddo outputsLoop
|
enddo outputsLoop
|
||||||
|
|
||||||
constitutive_j2_sizeDotState(i) = 1_pInt
|
|
||||||
constitutive_j2_sizeState(i) = 1_pInt
|
|
||||||
|
|
||||||
constitutive_j2_Cslip_66(1:6,1:6,i) = lattice_symmetrizeC66(constitutive_j2_structureID(i),&
|
|
||||||
constitutive_j2_Cslip_66(1:6,1:6,i))
|
|
||||||
constitutive_j2_Cslip_66(1:6,1:6,i) = &
|
constitutive_j2_Cslip_66(1:6,1:6,i) = &
|
||||||
math_Mandel3333to66(math_Voigt66to3333(constitutive_j2_Cslip_66(1:6,1:6,i))) ! Literature data is Voigt, DAMASK uses Mandel
|
lattice_symmetrizeC66(constitutive_j2_structureID(i),constitutive_j2_Cslip_66(1:6,1:6,i))
|
||||||
|
constitutive_j2_Cslip_66(1:6,1:6,i) = & ! Literature data is Voigt, DAMASK uses Mandel
|
||||||
|
math_Mandel3333to66(math_Voigt66to3333(constitutive_j2_Cslip_66(1:6,1:6,i)))
|
||||||
enddo instancesLoop
|
enddo instancesLoop
|
||||||
|
|
||||||
end subroutine constitutive_j2_init
|
end subroutine constitutive_j2_init
|
||||||
|
|
|
@ -112,8 +112,8 @@ subroutine constitutive_none_init(fileUnit)
|
||||||
if (iand(debug_level(debug_constitutive),debug_levelBasic) /= 0_pInt) &
|
if (iand(debug_level(debug_constitutive),debug_levelBasic) /= 0_pInt) &
|
||||||
write(6,'(a16,1x,i5,/)') '# instances:',maxNinstance
|
write(6,'(a16,1x,i5,/)') '# instances:',maxNinstance
|
||||||
|
|
||||||
allocate(constitutive_none_sizeDotState(maxNinstance), source=0_pInt)
|
allocate(constitutive_none_sizeDotState(maxNinstance), source=1_pInt)
|
||||||
allocate(constitutive_none_sizeState(maxNinstance), source=0_pInt)
|
allocate(constitutive_none_sizeState(maxNinstance), source=1_pInt)
|
||||||
allocate(constitutive_none_sizePostResults(maxNinstance), source=0_pInt)
|
allocate(constitutive_none_sizePostResults(maxNinstance), source=0_pInt)
|
||||||
allocate(constitutive_none_structureID(maxNinstance), source=LATTICE_undefined_ID)
|
allocate(constitutive_none_structureID(maxNinstance), source=LATTICE_undefined_ID)
|
||||||
allocate(constitutive_none_Cslip_66(6,6,maxNinstance), source=0.0_pReal)
|
allocate(constitutive_none_Cslip_66(6,6,maxNinstance), source=0.0_pReal)
|
||||||
|
@ -141,7 +141,6 @@ subroutine constitutive_none_init(fileUnit)
|
||||||
tag = IO_lc(IO_stringValue(line,positions,1_pInt)) ! extract key
|
tag = IO_lc(IO_stringValue(line,positions,1_pInt)) ! extract key
|
||||||
select case(tag)
|
select case(tag)
|
||||||
case ('plasticity','elasticity')
|
case ('plasticity','elasticity')
|
||||||
cycle
|
|
||||||
case ('lattice_structure')
|
case ('lattice_structure')
|
||||||
structure = IO_lc(IO_stringValue(line,positions,2_pInt))
|
structure = IO_lc(IO_stringValue(line,positions,2_pInt))
|
||||||
select case(structure(1:3))
|
select case(structure(1:3))
|
||||||
|
@ -182,14 +181,10 @@ subroutine constitutive_none_init(fileUnit)
|
||||||
enddo
|
enddo
|
||||||
|
|
||||||
instancesLoop: do i = 1_pInt,maxNinstance
|
instancesLoop: do i = 1_pInt,maxNinstance
|
||||||
constitutive_none_sizeDotState(i) = 1_pInt
|
|
||||||
constitutive_none_sizeState(i) = 1_pInt
|
|
||||||
|
|
||||||
constitutive_none_Cslip_66(1:6,1:6,i) = lattice_symmetrizeC66(constitutive_none_structureID(i),&
|
|
||||||
constitutive_none_Cslip_66(1:6,1:6,i))
|
|
||||||
constitutive_none_Cslip_66(1:6,1:6,i) = &
|
constitutive_none_Cslip_66(1:6,1:6,i) = &
|
||||||
|
lattice_symmetrizeC66(constitutive_none_structureID(i),constitutive_none_Cslip_66(1:6,1:6,i))
|
||||||
|
constitutive_none_Cslip_66(1:6,1:6,i) = & ! Literature data is Voigt, DAMASK uses Mandel
|
||||||
math_Mandel3333to66(math_Voigt66to3333(constitutive_none_Cslip_66(1:6,1:6,i)))
|
math_Mandel3333to66(math_Voigt66to3333(constitutive_none_Cslip_66(1:6,1:6,i)))
|
||||||
|
|
||||||
enddo instancesLoop
|
enddo instancesLoop
|
||||||
|
|
||||||
end subroutine constitutive_none_init
|
end subroutine constitutive_none_init
|
||||||
|
|
|
@ -118,7 +118,7 @@ subroutine homogenization_RGC_init(fileUnit)
|
||||||
integer(pInt), intent(in) :: fileUnit !< file pointer to material configuration
|
integer(pInt), intent(in) :: fileUnit !< file pointer to material configuration
|
||||||
integer(pInt), parameter :: MAXNCHUNKS = 4_pInt
|
integer(pInt), parameter :: MAXNCHUNKS = 4_pInt
|
||||||
integer(pInt), dimension(1_pInt+2_pInt*MAXNCHUNKS) :: positions
|
integer(pInt), dimension(1_pInt+2_pInt*MAXNCHUNKS) :: positions
|
||||||
integer(pInt) ::section=0_pInt, maxNinstance, i,j,e, output=-1_pInt, mySize, myInstance
|
integer(pInt) :: section=0_pInt, maxNinstance, i,j,e, output=-1_pInt, mySize, myInstance
|
||||||
character(len=65536) :: &
|
character(len=65536) :: &
|
||||||
tag = '', &
|
tag = '', &
|
||||||
line = ''
|
line = ''
|
||||||
|
@ -169,8 +169,7 @@ subroutine homogenization_RGC_init(fileUnit)
|
||||||
positions = IO_stringPos(line,MAXNCHUNKS)
|
positions = IO_stringPos(line,MAXNCHUNKS)
|
||||||
tag = IO_lc(IO_stringValue(line,positions,1_pInt)) ! extract key
|
tag = IO_lc(IO_stringValue(line,positions,1_pInt)) ! extract key
|
||||||
select case(tag)
|
select case(tag)
|
||||||
case ('type')
|
case ('nconstituents','ngrains','type')
|
||||||
cycle
|
|
||||||
case ('(output)')
|
case ('(output)')
|
||||||
output = output + 1_pInt
|
output = output + 1_pInt
|
||||||
homogenization_RGC_output(output,i) = IO_lc(IO_stringValue(line,positions,2_pInt))
|
homogenization_RGC_output(output,i) = IO_lc(IO_stringValue(line,positions,2_pInt))
|
||||||
|
@ -203,6 +202,8 @@ subroutine homogenization_RGC_init(fileUnit)
|
||||||
homogenization_RGC_Ngrains(1,i) = IO_intValue(line,positions,2_pInt)
|
homogenization_RGC_Ngrains(1,i) = IO_intValue(line,positions,2_pInt)
|
||||||
homogenization_RGC_Ngrains(2,i) = IO_intValue(line,positions,3_pInt)
|
homogenization_RGC_Ngrains(2,i) = IO_intValue(line,positions,3_pInt)
|
||||||
homogenization_RGC_Ngrains(3,i) = IO_intValue(line,positions,4_pInt)
|
homogenization_RGC_Ngrains(3,i) = IO_intValue(line,positions,4_pInt)
|
||||||
|
if (homogenization_Ngrains(section) /= product(homogenization_RGC_Ngrains(1:3,i))) &
|
||||||
|
call IO_error(211_pInt,ext_msg=trim(tag)//' ('//HOMOGENIZATION_RGC_label//')')
|
||||||
case ('scalingparameter')
|
case ('scalingparameter')
|
||||||
homogenization_RGC_xiAlpha(i) = IO_floatValue(line,positions,2_pInt)
|
homogenization_RGC_xiAlpha(i) = IO_floatValue(line,positions,2_pInt)
|
||||||
case ('overproportionality')
|
case ('overproportionality')
|
||||||
|
|
|
@ -131,7 +131,6 @@ subroutine homogenization_isostrain_init(fileUnit)
|
||||||
tag = IO_lc(IO_stringValue(line,positions,1_pInt)) ! extract key
|
tag = IO_lc(IO_stringValue(line,positions,1_pInt)) ! extract key
|
||||||
select case(tag)
|
select case(tag)
|
||||||
case('type')
|
case('type')
|
||||||
cycle
|
|
||||||
case ('(output)')
|
case ('(output)')
|
||||||
output = output + 1_pInt
|
output = output + 1_pInt
|
||||||
homogenization_isostrain_output(output,i) = IO_lc(IO_stringValue(line,positions,2_pInt))
|
homogenization_isostrain_output(output,i) = IO_lc(IO_stringValue(line,positions,2_pInt))
|
||||||
|
@ -159,6 +158,7 @@ subroutine homogenization_isostrain_init(fileUnit)
|
||||||
case ('average','mean','avg')
|
case ('average','mean','avg')
|
||||||
homogenization_isostrain_mapping(i) = average_ID
|
homogenization_isostrain_mapping(i) = average_ID
|
||||||
case default
|
case default
|
||||||
|
call IO_error(211_pInt,ext_msg=trim(tag)//' ('//HOMOGENIZATION_isostrain_label//')')
|
||||||
end select
|
end select
|
||||||
case default
|
case default
|
||||||
call IO_error(210_pInt,ext_msg=trim(tag)//' ('//HOMOGENIZATION_isostrain_label//')')
|
call IO_error(210_pInt,ext_msg=trim(tag)//' ('//HOMOGENIZATION_isostrain_label//')')
|
||||||
|
|
Loading…
Reference in New Issue