From 4dbf6ac3faa6282be6ce2f8604f9a02c99f7cd9b Mon Sep 17 00:00:00 2001 From: Philip Eisenlohr Date: Tue, 6 Nov 2007 08:30:04 +0000 Subject: [PATCH] added volume fraction of orientation to output array (now CPFEM_Nresults = 4) --- trunk/CPFEM.f90 | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/trunk/CPFEM.f90 b/trunk/CPFEM.f90 index ea03a0e77..8f144fae3 100644 --- a/trunk/CPFEM.f90 +++ b/trunk/CPFEM.f90 @@ -24,7 +24,7 @@ real(pReal), dimension (:,:,:,:), allocatable :: CPFEM_jaco_old integer(pInt) :: CPFEM_inc_old = 0_pInt integer(pInt) :: CPFEM_subinc_old = 1_pInt - integer(pInt) :: CPFEM_Nresults = 3_pInt + integer(pInt) :: CPFEM_Nresults = 4_pInt ! three Euler angles plus volume fraction logical :: CPFEM_first_call = .true. CONTAINS @@ -230,6 +230,10 @@ CPFEM_Fp_new(:,:,grain,CPFEM_in,cp_en) = Fp(:,:,i_then) constitutive_state_new(:,grain,CPFEM_in,cp_en) = state(:,i_then) CPFEM_sigma_new(:,grain,CPFEM_in,cp_en) = Tstar_v +! ---- contribute to IP result ---- + volfrac = constitutive_matVolFrac(grain,CPFEM_in,cp_en)*constitutive_texVolFrac(grain,CPFEM_in,cp_en) + CPFEM_stress_all(:,CPFEM_in,cp_en) = CPFEM_stress_all(:,CPFEM_in,cp_en)+volfrac*cs ! average Cauchy stress + if (updateJaco) CPFEM_jaco_old(:,:,CPFEM_in,cp_en) = CPFEM_jaco_old(:,:,CPFEM_in,cp_en)+volfrac*cd ! average consistent tangent ! ---- update results plotted in MENTAT ---- call math_pDecomposition(Fe,U,R,error) ! polar decomposition if (error) then @@ -241,14 +245,10 @@ return endif CPFEM_results(1:3,grain,CPFEM_in,cp_en) = math_RtoEuler(transpose(R))*inDeg ! orientation - CPFEM_results(4:3+constitutive_Nresults(grain,CPFEM_in,cp_en),grain,CPFEM_in,cp_en) = & + CPFEM_results(4 ,grain,CPFEM_in,cp_en) = volfrac ! volume fraction of orientation + CPFEM_results(5:4+constitutive_Nresults(grain,CPFEM_in,cp_en),grain,CPFEM_in,cp_en) = & constitutive_post_results(Tstar_v,state(:,i_then),CPFEM_dt,CPFEM_Temperature(CPFEM_in,cp_en),grain,CPFEM_in,cp_en) -! ---- contribute to IP result ---- - volfrac = constitutive_matVolFrac(grain,CPFEM_in,cp_en)*constitutive_texVolFrac(grain,CPFEM_in,cp_en) - CPFEM_stress_all(:,CPFEM_in,cp_en) = CPFEM_stress_all(:,CPFEM_in,cp_en)+volfrac*cs ! average Cauchy stress - if (updateJaco) CPFEM_jaco_old(:,:,CPFEM_in,cp_en) = CPFEM_jaco_old(:,:,CPFEM_in,cp_en)+volfrac*cd ! average consistent tangent - enddo ! grain loop return