CalculiX  2.13
A Free Software Three-Dimensional Structural Finite Element Program
materialdata_cp_sec.f File Reference

Go to the source code of this file.

Functions/Subroutines

subroutine materialdata_cp_sec (imat, ntmat_, t1l, shcon, nshcon, cp, physcon)
 

Function/Subroutine Documentation

◆ materialdata_cp_sec()

subroutine materialdata_cp_sec ( integer  imat,
integer  ntmat_,
real*8  t1l,
real*8, dimension(0:3,ntmat_,*)  shcon,
integer, dimension(*)  nshcon,
real*8  cp,
real*8, dimension(*)  physcon 
)
20 !
21  implicit none
22 !
23 ! determines the secant specific heat at constant pressure cp
24 !
25 ! the difference with materialdata_cp is that the specific heat at
26 ! constant pressure cp as returned from the present routine
27 ! is the secant value and not the differential value.
28 ! For the differential value we have:
29 ! dh=cp*dT
30 ! and consequently
31 ! h=int_from_0_to_T cp*dT
32 ! For the secant value one has:
33 ! h=cp_secant*T
34 !
35  integer imat,ntmat_,id,nshcon(*),four,i
36 !
37  real*8 t1l,shcon(0:3,ntmat_,*),cp,physcon(*)
38 !
39  four=4
40 !
41 ! calculating the tangent specific heat
42 !
43  call ident2(shcon(0,1,imat),t1l,nshcon(imat),four,id)
44  if(nshcon(imat).eq.0) then
45  continue
46  elseif(nshcon(imat).eq.1) then
47  cp=shcon(1,1,imat)
48  elseif(id.eq.0) then
49  cp=shcon(1,1,imat)
50  elseif(id.eq.nshcon(imat)) then
51  cp=(shcon(0,1,imat)-physcon(1))*shcon(1,1,imat)
52  do i=2,nshcon(imat)
53  cp=cp+(shcon(0,i,imat)-shcon(0,i-1,imat))*
54  & (shcon(1,i,imat)+shcon(1,i-1,imat))/2.d0
55  enddo
56  cp=cp+(t1l-shcon(0,nshcon(imat),imat))*
57  & (shcon(1,nshcon(imat),imat))
58  cp=cp/(t1l-physcon(1))
59  else
60  cp=shcon(1,id,imat)+
61  & (shcon(1,id+1,imat)-shcon(1,id,imat))*
62  & (t1l-shcon(0,id,imat))/
63  & (shcon(0,id+1,imat)-shcon(0,id,imat))
64  cp=(t1l-shcon(0,id,imat))*(cp+shcon(1,id,imat))/2.d0
65  do i=2,id
66  cp=cp+(shcon(0,i,imat)-shcon(0,i-1,imat))*
67  & (shcon(1,i,imat)+shcon(1,i-1,imat))/2.d0
68  enddo
69  cp=cp+(shcon(0,1,imat)-physcon(1))*shcon(1,1,imat)
70  cp=cp/(t1l-physcon(1))
71  endif
72 !
73  return
subroutine ident2(x, px, n, ninc, id)
Definition: ident2.f:27
Hosted by OpenAircraft.com, (Michigan UAV, LLC)