Work hardening subroutines
loiv_sig0.f90 file
c-------------------------------------------------------------------------------
c loiv_sig0.f90 file
c-------------------------------------------------------------------------------
#include "index_maccros.inc"
!-----------------------------------------------------------------------
subroutine loiv_sig0(nom, nom_rheol, nbpar, elt, nint, dt, temp, &
& ebp, ebpreg, sig0, dsig0_debp, eb, dsig0_deb, &
& gs_par )
!DEC$ ATTRIBUTES DLLEXPORT::loiv_sig0
...
if (CHECK_(SELLARS_TEGGART ) ) then
!**********************************************************************
! Loi de SELLARS-TEGGART avec ecrouissage de VOCE
...
else if (CHECK_(SHS_JC ) ) then
!**********************************************************************
! SWIFT-HOCKETT-SHERBY with Johnson-Cook extension
! sig0 = (1-alpha)*[B*(Eb+Eb0)**n]+alpha*[sig_sat-(sig_sat-sig_i)*exp(-a*Eb**p)]
! sig0 = sig0 * [1+C*ln(Ebp/Ebp0))]*[1-((T-TR)/(TM-TR))**m] !< JC extension
!LOIV SIG0
! SHS_JC
! PAR Sig_Sat = <valeur>1 Coef
! PAR Sig_i = <valeur>2 Coef
! PAR alpha = <valeur>3 Coef
! PAR a = <valeur>4 Coef
! PAR B = <valeur>5 Coef
! PAR C = <valeur>6 Coef
! PAR N = <valeur>7 Coef
! PAR P = <valeur>8 Coef
! PAR M = <valeur>9 Coef
! PAR Eb0 = <valeur>10 Reference Strain Rate
! PAR Ebp0 = <valeur>11 Eq.Plastic Strain Rate
! PAR TM = <valeur>12 Melting Temperature
! PAR TR = <valeur>13 Refernce Temperature
!FIN LOI
!**********************************************************************
if (nbpar.ne.13) goto 99
associate( sig_s=>gs_par(1), sig_i=>gs_par(2), alpha=>gs_par(3), a=>gs_par(4), B=>gs_par(5), &
& C=>gs_par(6), N=>gs_par(7), P=>gs_par(8), M=>gs_par(9), Eb0=>gs_par(10), Ebp0=>gs_par(11), &
& TM=>gs_par(12)+ Unites_Temp_decal, TR=>gs_par(13)+ Unites_Temp_decal, &
& term1=>realvars(1), dterm1_ep=>realvars(2), term2=>realvars(3), dterm2_sr=>realvars(4), term3=>realvars(5) )
! Regularize the strain and the strain rate
Eb_r = Eb + Eb0 !< Plastic deformation
Ebp_r = dmax1(Ebp,Ebp0) !< Strain Rate
! SWIFT-HOCKETT-SHERBY Term
term1 = (1.d0-alpha)*( B*Eb_r**n ) + alpha*(sig_s-(sig_s-sig_i)*dexp(-a*Eb**p))
dterm1_ep = (1.d0-alpha)*n*( B*Eb_r**(n-1.d0) ) + alpha*( (sig_s-sig_i)*a*p*Eb**(p-1.d0)*dexp(-a*Eb**p))
! JC extension terms
term2 = 1.d0 + C * dlog(Ebp_r/Ebp0)
dterm2_sr = C/Ebp_r
term3 = 1.d0
if( M > 0.d0 ) then
if ( Temp>=TR .and. Temp<=TM ) then
term3 = 1.d0 - ((Temp - TR)/(TM - TR))**M
else if( Temp>TM ) then
term3 = 1d-10
endif
end if
sig0 = term1 * term2 * term3
dsig0_deb = dterm1_ep * term2 * term3
dsig0_debp = term1 * dterm2_sr * term3
end associate
else
write(*,*) ' >> Loi d''ecoulement utilisateur non reconnue : ', &
& nom
write(*,1000)
call dealloc_all
stop
endif
return
The material file *.tmf
{ Software= rermapct_diagram_generator_V_1.0.0.0 }
{ Supported_Software= FORGE2 FORGE3 COLDFORM2 COLDFORM3 FSTRUCT2 FSTRUCT3 RIV3D }
{ Comments=
Type_Calcul: cold forming
Type_Mat: General_Steel
}
{ Rheological_Units= mm-MPa }
{ Rheological_Data_as_Text=
EVP
LOIV SIG0
! SWIFT-HOCKETT-SHERBY with Johnson-Cook extension
! sig0 = (1-alpha)*[B*(Ebp+Eb0)**n]+alpha*[sig_sat-(sig_sat-sig_i)*exp(-a*Ebp**p)] ! SHS
! sig0 = sig0 * [1+C*ln(Ebp/Ebp0))]*[1-((T-TR)/(TM-TR))**m] !< JC extension
SHS_JC
PAR SHS_Sig_Sat = 669.495752998746
PAR SHS_Sig_i = 194.972805762886
PAR SHS_alpha = 0.360770668313627
PAR SHS_a = 100.157865505574
PAR SHS_B = 1840.5095593623
PAR SHS_C = 0.0311500806854708 ! JC Strain rate sensitivity
PAR SHS_N = 0.307615148600403
PAR SHS_P = 0.701498942589002
PAR SHS_M_JC = 0.500268993821536 ! JC Temperature sensitivity
PAR SHS_Eb0 = 0.0411329265250293 ! Reference plastic strain
PAR SHS_Ebp0 = 0.00881841917541613 ! Reference strain rate
PAR SHS_TM = 7202.16700857237 ! JC Melting Temperature °C
PAR SHS_TR = 20.0 ! JC Reference Temperature °C
FIN LOI
!Elasticity coefficients
YoungModulus=200000
PoissonCoeff=0.3
}
{ Thermal_Units= SI }
{ Thermal_Data_as_Text=
! Thermal coefficients
! Material type:General_Steel
! Properties type: thermal
! Units: SI
Specific Heat=778
Density=7850
Conductivity=35.5
L_Expansion=0 ! Expansion
Epsilon=0.88 ! Emissivity
}
Ductile fracture criteria subroutines
How to implement a user hardening & failure criteria in Forge
- After installing Forge, locate the UserF2 (2D) & UserF3 (3D) folders in your computer: C:\Transvalor_Solutions\FORGE_NxT_4.0\User
- There are two folders inside: Sources and UserProjects. The former contains the files with the subroutines, while the latter has the compilable file (*.vfproj).
- The hardening subroutine is located in the loiv_sig0.f90 file.
- The ductile fracture initiation criterion subroutine is located in the loiv_util.f90 file.
- Once the modifications of each file are complete with the provided subroutines in Fortran language, we will focus on the mod_loiv_sig0_index.f90 and the mod_loiv_util__index.f90 files.
- We should insert our subroutine name ("DUC_FARC_NAME") in 2 different places, as shown in the code below. Only the mod_loiv_util__index.f90 is shown for illustration purposes.
c mod_loiv_util_index.f90 file
c insert your subroutine name DUC_FRAC_NAME
module mod_idx_loiv_util
use mod_hash_table_usr
implicit none
type(Hash_tbl_st), target :: hash_tbl
integer, parameter :: IDX_(ABS_SIGMA_PRINC ) = 1
...
integer, parameter :: IDX_(DUC_FRAC_NAME ) = 83
...
integer, parameter :: IDX_(OPT_MASS_GAIN ) = 90
end module
...
subroutine create_loiv_util_idx_table()
use mod_idx_loiv_util
call create( hash_tbl, 100 * 4 )
ADD_LAW_(ABS_SIGMA_PRINC )
...
ADD_LAW_(DUC_FRAC_NAME )
...
ADD_LAW_(OPT_MASS_GAIN )
end subroutine
- The last step would be to compile the files. In our case the combination of Parallel Studio XE2011 with VS2010 works.
- Before doing so, open the *.vfproj file with Visual Studio and remove the option /check:stack from the compiler. You can find the options right clicking in the project file and accessing Properties> Fortran>Command Line
- Also remember to unckeck the Checking Routine Interfaces available in Properties>Fortran>Diagnostics>Check Routine Interfaces>NO and accept.
- You are now ready to compile.
- After successful compilation the ForgeUserRoutines.dll file will created in the UserProjects\x64_debug folder.
- Finally rename the ForgeUserRoutines.dll file to userroutines.dll otherwise Forge will not recognise the file.
by David Abedul & Borja Erice