-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathCOM.f03
128 lines (124 loc) · 5.97 KB
/
COM.f03
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
Module COM
implicit none
type Grid
real(8),allocatable,dimension(:,:)::Xp,Yp,Zp,Xp0,Yp0,Zp0,X,Y,Z,X0,Y0,Z0,panel,DE,DG,DF,DE1,DE2,DG1,DG2,DF1,DF2
end type
type Force
real(8),allocatable,dimension(:,:)::P,Ax,Ay,Az,beta,dropv,A1,A2,G1,G2,G3
end type
type Energy
real(8),allocatable,dimension(:,:)::Uae,hcv,Tb,qe0,qe1,qr0,qr1,mev,msv
end type
type Flux
real(8),allocatable,dimension(:,:)::Q1,Q2,Qp1,Qp2,dQp1,dQp2,sax,say
end type
type Imp
real(8),allocatable,dimension(:,:,:)::ahM
real(8),allocatable,dimension(:,:)::bh,dh,dh0
end type
type Icecoordinate
real(8),allocatable,dimension(:,:)::h,b,b0,Xi,Yi,Zi,Xi0,Yi0,Zi0,Xw,Yw,Zw,hn,bn
end type
type Boundata
real(8),allocatable,dimension(:)::Xbcl,Ybcl,Zbcl,Xpbcl,Ypbcl,Zpbcl,Pbcl,A1bcl,G1bcl,hbcl,Xbcr,Ybcr,Zbcr,Xpbcr,Ypbcr,Zpbcr,Pbcr,A1bcr,&
G1bcr,hbcr,Xbcu,Ybcu,Zbcu,Xpbcu,Ypbcu,Zpbcu,Pbcu,A2bcu,G2bcu,hbcu,Xbcd,Ybcd,Zbcd,Xpbcd,Ypbcd,Zpbcd,Pbcd,A2bcd,G2bcd,hbcd,Qp1bcl,&
Qp1bcr,Qp2bcu,Qp2bcd,dQp1bcl,dQp1bcr,dQp2bcu,dQp2bcd,dhbcl,dhbcr,dhbcu,dhbcd,DEbcl,DEbcr,DEbcu,DEbcd,DGbcl,DGbcr,DGbcu,DGbcd,DFbcl,&
DFbcr,DFbcu,DFbcd,dul,dur,dvu,dvd,saxl,saxr,sayu,sayd,bbcl,bbcr,bbcu,bbcd,bbcl0,bbcr0,bbcu0,bbcd0,hbcll,hbcrr,hbcuu,hbcdd,bbcll,&
bbcrr,bbcuu,bbcdd
end type
type topo
integer,allocatable,dimension(:)::nbl,nbr,nbu,nbd,Iindexl,Jindexl,Iindexr,Jindexr,Iindexu,Jindexu,Iindexd,Jindexd,Iindexll,Jindexll,&
Iindexrr,Jindexrr,Iindexuu,Jindexuu,Iindexdd,Jindexdd,nbpl,nbpr,nbpu,nbpd,Ipindexl,Jpindexl,Ipindexr,Jpindexr,Ipindexu,Jpindexu,&
Ipindexd,Jpindexd
character(1),allocatable,dimension(:)::topol,topor,topou,topod,topopl,topopr,topopu,topopd
end type
save
integer block,maxl,timestep,timeout
real(8) pi,g,R,Ma,rhoa,rhow,rhoi,mua,muw,sigma,ka,kw,ki,ca,cw,Pr,Prt,Tf,Lf,Lv,P0,epsi,sigmar,lwc,mvd,Ta,Td,Ts,Wf,c,hp,bp,dt,t,&
time,err,alpha
character(16) surtempcontrol,solutioncontrol,initialtimecontrol,discretecontrol,icecoupled,advancemethod,fluidproperty,Scpt
character(64) filename(5)
integer,allocatable,dimension(:)::In,Jn,Ig,Jg
character(32),allocatable,dimension(:)::formn,formc
type(Grid),allocatable,dimension(:),target::Grids
type(Force),allocatable,dimension(:)::Forces
type(Energy),allocatable,dimension(:)::Energys
type(Flux),allocatable,dimension(:),target::Fluxs
type(Imp),allocatable,dimension(:)::Imps
type(Icecoordinate),allocatable,dimension(:),target::Icecoordinates
type(Boundata),allocatable,dimension(:),target::Boundatas
type(topo),allocatable,dimension(:)::topos
contains
integer Function sgn(x)
real(8) x
if(x>0) then
sgn=1
else if(x<0) then
sgn=-1
else
sgn=0
end if
return
end Function sgn
end module COM
! Following is a list of identifiers in module COM with their meanings
! Grid Data structure for surface multi-block structured mesh
! Force Data structure for driven force and collection property
! Energy Data structure for heat transfer related coefficients
! Flux Data structure for flow flux of water film
! Imp Data structure for matrix coefficients and source terms of an implicit water film flow equation
! Icecoordinate Data structure for thickness of water and ice (unknown variables) and coordinates of ice shape
! Boundata Data structure for boundary field
! topo Data structure for topology information
! block Patches of the surface structured mesh
! maxl Maximum iteration steps for solving the linear equations in an implicit time marching
! timestep Current time steps in a time marching
! timeout Total time steps in a time marching
! pi Circular constant
! g Gravitational acceleration
! R Universal gas constant
! Ma Molecular weight of air
! rhoa Density of air
! rhow Density of water
! rhoi Density of ice
! mua Viscosity of air
! muw Viscosity of water
! ka Thermal conductivity of air
! kw Thermal conductivity of water
! ki Thermal conductivity of ice
! ca Specific heat at constant pressure of air
! cw Specific heat of water
! Pr Prandtl number
! Prt Turbulent Prandtl number
! P0 Pressure of free stream
! Wf Velocity of free stream
! epsi Heat emissivity
! sigmar Stefan constant
! lwc Liquid Water Content
! mvd Mean Volume Diameter
! Ta Temperature of air
! Td Temperature of droplets
! Ts Temperature of substract
! Tf Fusion point of ice
! Lf Latent heat of fusion
! Lv Latent heat of evaporation
! c Scaling factor
! hp,bp Precursor thickness of water and ice
! dt Time step
! t Total time
! time Current time
! err Minimum residuals for solving the linear equations in an implicit time marching
! alpha Empirical factor of thermal conduction in ice layer
! surtempcontrol Whether using an inner iteration to calulate the surface temperature
! solutioncontrol Whether using explicit or implicit time marching method
! initialtimecontrol Whether initializing from a clean surface
! discretecontrol The discrete method for flow flux at cell interface
! icecoupled Whether coupling with the icing equation
! advancemethod The pseudo-steady method
! fluidproperty The air property
! Scpt Whether using a script file
! filename File name
! In,Jn Dimensions of the grid nodes in each direction of one patch
! Ig,Jg Dimensions of the grid cells in each direction of one patch
! formn,formc Formatted strings
! sgn() Sign function