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 physicalconstantss(inpc,textpart,physcon,
20     &  istep,istat,n,iline,ipol,inl,ipoinp,inp,ipoinpc,ier)
21!
22!     reading the input deck: *PHYSICAL CONSTANTS
23!
24!     physcon(1): absolute zero temperature
25!            (2): Stefan-Boltzmann constant
26!            (3): Newton gravity constant
27!            (4): Static temperature at infinity (CFD)
28!            (5): Norm of the velocity vector at infinity (CFD)
29!            (6): Static pressure at infinity (CFD)
30!            (7): Density at infinity (CFD)
31!            (8): Length of the computational domain (CFD)
32!            (9): perturbation flag (CFD)
33!
34      implicit none
35!
36      character*1 inpc(*)
37      character*132 textpart(16)
38!
39      integer i,istep,istat,n,key,iline,ipol,inl,ipoinp(2,*),inp(3,*),
40     &  ipoinpc(0:*),ier
41!
42      real*8 physcon(*)
43!
44      if(istep.gt.0) then
45         write(*,*)
46     &      '*ERROR reading *PHYSICAL CONSTANTS: *PHYSICAL CONSTANTS'
47         write(*,*) '        should only be used before the first STEP'
48         ier=1
49         return
50      endif
51!
52      do i=2,n
53         if(textpart(i)(1:13).eq.'ABSOLUTEZERO=') then
54            read(textpart(i)(14:33),'(f20.0)',iostat=istat) physcon(1)
55            if(istat.gt.0) then
56               call inputerror(inpc,ipoinpc,iline,
57     &              "*PHYSICAL CONSTANTS%",ier)
58               return
59            endif
60         elseif(textpart(i)(1:16).eq.'STEFANBOLTZMANN=') then
61            read(textpart(i)(17:36),'(f20.0)',iostat=istat) physcon(2)
62            if(istat.gt.0) then
63               call inputerror(inpc,ipoinpc,iline,
64     &              "*PHYSICAL CONSTANTS%",ier)
65               return
66            endif
67         elseif(textpart(i)(1:14).eq.'NEWTONGRAVITY=') then
68            read(textpart(i)(15:24),'(f20.0)',iostat=istat) physcon(3)
69            if(istat.gt.0) then
70               call inputerror(inpc,ipoinpc,iline,
71     &              "*PHYSICAL CONSTANTS%",ier)
72               return
73            endif
74         else
75            write(*,*)
76     &        '*WARNING in physicalconstants: parameter not recognized:'
77            write(*,*) '         ',
78     &                 textpart(i)(1:index(textpart(i),' ')-1)
79            call inputwarning(inpc,ipoinpc,iline,
80     &"*PHYSICAL CONSTANTS%")
81         endif
82      enddo
83!
84      call getnewline(inpc,textpart,istat,n,key,iline,ipol,inl,
85     &     ipoinp,inp,ipoinpc)
86!
87      return
88      end
89
90
91
92
93
94
95
96