1!
2!     CalculiX - A 3-dimensional finite element program
3!              Copyright (C) 1998-2021 Guido Dhondt
4!
5!     This program is free software; you can redistribute it and/or
6!     modify it under the terms of the GNU General Public License as
7!     published by the Free Software Foundation(version 2);
8!
9!
10!     This program is distributed in the hope that it will be useful,
11!     but WITHOUT ANY WARRANTY; without even the implied warranty of
12!     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13!     GNU General Public License for more details.
14!
15!     You should have received a copy of the GNU General Public License
16!     along with this program; if not, write to the Free Software
17!     Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
18!
19      subroutine materialdata_cfd_comp2(shcon,nshcon,ielmatf,
20     &  ntmat_,mi,vfa,cocon,ncocon,physcon,cvfa,ithermal,
21     &  umfa,ielfa,hcfa,nfacea,nfaceb)
22!
23!     calculation of material properties at elements centers and
24!     face centers (compressible fluids)
25!
26      implicit none
27!
28      integer i,imat,ntmat_,mi(*),ielmatf(mi(3),*),ithermal(*),
29     &  nshcon(2,*),ncocon(2,*),ielfa(4,*),nfacea,nfaceb
30!
31      real*8 t1l,shcon(0:3,ntmat_,*),vfa(0:7,*),
32     &  cp,cocon(0:6,ntmat_,*),physcon(*),cvfa(*),umfa(*),
33     &  hcfa(*)
34!
35!
36!
37!     facial values
38!
39      do i=nfacea,nfaceb
40         t1l=vfa(0,i)
41!
42!        take the material of the first adjacent element
43!
44         imat=ielmatf(1,ielfa(1,i))
45!
46!        density
47!
48c         vfa(5,i)=vfa(4,i)/(shcon(3,1,imat)*t1l)
49!
50!        heat capacity at constant volume
51!
52         call materialdata_cp_sec(imat,ntmat_,t1l,shcon,nshcon,cp,
53     &       physcon)
54!
55!        cv=cp-r
56!
57         cvfa(i)=cp-shcon(3,1,imat)
58!
59!        dynamic viscosity
60!
61         call materialdata_dvi(shcon,nshcon,imat,umfa(i),t1l,ntmat_,
62     &            ithermal)
63!
64!        heat conduction
65!
66         call materialdata_cond(imat,ntmat_,t1l,cocon,ncocon,hcfa(i))
67      enddo
68!
69      return
70      end
71