- 积分
- 10
- 注册时间
- 2003-2-23
- 仿真币
-
- 最后登录
- 1970-1-1
|
做一个多相流问题时,出现如下错误:
Sum of initial mass fraction must be 1.0
就是说各相质量分数之和必须为1.0
比如两相:液体占0.8,那么气体就占0.2;
问题是我已经设置了,但是不起作用,下面我将我的相关命令流和一个例子的命令流贴出来,大家帮忙看看什么地方错了,谢谢!!!
/SOL
SOLVE
FLST,2,1111,1,ORDE,2
FITEM,2,1112
FITEM,2,-2222
IC,P51X,SP01,0, !这几句
FLST,2,1111,1,ORDE,2
FITEM,2,1112
FITEM,2,-2222
IC,P51X,SP02,1, !这几句
FLST,2,1111,1,ORDE,2
FITEM,2,1
FITEM,2,-1111
IC,P51X,SP02,0, !这几句
FLST,2,1111,1,ORDE,2
FITEM,2,1
FITEM,2,-1111
IC,P51X,SP01,1, !这几句
例子:
13.4. Doing a Heat Exchanger Analysis Using Two Species
Although FLOTRAN permits only one fluid region to correspond to material number 1 (using the command MAT,1 or an equivalent GUI path), you can simulate multiple fluids within this restriction. To do so, you set all fluid property types to CMIX, then set the appropriate species mass fraction to 1.0 in a particular region. These settings enable all properties in that region to correspond to that of species with mass fraction 1.0. For such multiple fluid simulations, the mass fractions must remain constant throughout the analysis; that is, the analysis should not turn on the species solution.
A typical heat exchanger analysis consists of two fluids flowing in opposite directions, separated by a wall as shown in Environment for a Typical Heat Exchanger Analysis:
Figure 13.1. Environment for a Typical Heat Exchanger Analysis
The sample command stream that follows shows you how to set up the model shown in Environment for a Typical Heat Exchanger Analysis, apply boundary conditions, set up appropriate properties, etc. It is important to note that, although two species are defined, the species transport has not been activated. In addition, all fluid properties must be declared variable so that the initial value (the same in regions 1 and 2) is reset based on the mass fraction.
/BATCH,LIST
/tit,heat exchanger problem
!two different fluids separated by a solid wall
!cartesian geometry, pressure-driven flow
!solve by 2 species
LX = 10 ! Length in X direction
NDX = 10 ! Number of X divisions
LY1 = 2 ! fluid 1 width
LY2 = 0.1 ! solid width
LY3 = 1.0 ! fluid 2 width
NDY1 = 10
NDY2 = 3
NDY3 = 10
YOFFSET = 0 !offset from X-axis
/prep7 $smrt,off
et,1,141 ! 2D XY system
!species
keyopt,1,1,2 ! 2 species
!axisymm
!keyopt,1,3,2 !use for axisymm RY system only
esha,2 ! Quad elements
rect,,LX,YOFFSET,YOFFSET+LY1 !fluid 1 area
rect,,LX,YOFFSET+LY1,YOFFSET+LY1+LY2 !solid area
rect,,LX,YOFFSET+LY1+LY2,YOFFSET+LY1+LY2+LY3 !fluid 2 area
nummrg,all
numcmp,all
lsel,s,,,3,9,3
lsel,a,,,1
lesi,all,,,NDX,
lsel,s,,,2,4,2
lesi,all,,,NDY1,-5.0
lsel,s,,,5,7,2
lesi,all,,,NDY2,-5.0
lsel,s,,,8,10,2
lesi,all,,,NDY3,-5.0
allsel
mat,1 !for fluids material must be 1
amesh,1 !mesh fluid 1 region
amesh,3 !mesh fluid 2 region
mat,2 !for solid set material to 2
amesh,2 !mesh solid region
!inner region 1
!bc inlet
lsel,s,,,4
nsll,s,1
d,all,pres,10 !inlet pressure & temp specified for fluid 1
d,all,temp,100
!bc outlet
lsel,s,,,2
nsll,s,1
d,all,pres,0. !outlet pressure specified for fluid 1
!symm
lsel,s,,,1
nsll,s,1
d,all,vy,0 !symmetry surface for fluid 1 only
!region 2
!bc inlet
lsel,s,,,8
nsll,s,1
d,all,pres,10. !inlet pressure & temp specified for fluid 2
d,all,temp,400
!bc outlet
lsel,s,,,10
nsll,s,1
d,all,pres,0. !outlet pressure specified for fluid 2
!top wall
lsel,s,,,9
nsll,s,1
d,all,vx,0 !wall boundary conditions
d,all,vy,0
allsel
!solid properties
mp,dens,2,5. !specify solid region 3 properties
mp,kxx,2,100
mp,c,2,13
/SOLU
!ic for species
nsel,s,loc,x,,lx !select nodes for fluid 1
nsel,s,loc,y,o,ly1
ic,all,sp01,1.0 !set mass fraction for fluid 1 【就是这几句】
ic,all,sp02,0.0
nsel,s,loc,x,,lx
nsel,s,loc,y,ly1+ly2,ly1+ly2+ly3 !select nodes for fluid 2
ic,all,sp01,0.0 !set mass fraction for fluid 2 【就是这几句】
ic,all,sp02,1.0
allsel
FLDA,ITER,EXEC,200
FLDA,PROT,DENS,CMIX ! Fluid density
FLDA,PROT,VISC,CMIX ! Fluid viscosity
FLDA,PROT,COND,CMIX ! Fluid conductivity
FLDA,PROT,SPHT,CMIX ! Fluid specific heat
flda,vary,dens,t !all properties MUST be variable
flda,vary,visc,t
flda,vary,cond,t
flda,vary,spht,t
FLDA,NOMI,DENS,1.0 ! initial density for all fluid region
FLDA,NOMI,VISC,2.0 ! initial viscosity for all fluid region
FLDA,NOMI,COND,3.0 ! initial conductivity for all fluid region
FLDA,NOMI,SPHT,4.0 ! initial specific heat for all fluid region
msprop,1,spht,constant,1 !sp heat for fluid 1
msprop,2,spht,constant,2 !sp heat for fluid 2
msprop,1,dens,constant,1 !density for fluid 1
msprop,2,dens,constant,2 !density for fluid 2
msprop,1,visc,constant,1.0 !viscosity for fluid 1
msprop,2,visc,constant,2.0 !viscosity for fluid 2
msprop,1,cond,constant,.1 !conductivity for fluid 1
msprop,2,cond,constant,.2 !conductivity for fluid 2
FLDA,CONV,PRES,1.0E-10 ! PCCR convergence criterion
FLDA,TERM,PRES,1.E-09
FLDA,OUTP,SP01,T
FLDA,OUTP,SP02,T
save
SOLVE !solve for flow only
FLDA,SOLU,ENRG,T
FLDA,SOLU,FLOW,F
FLDA,METH,ENRG,3
FLDA,ITER,EXEC,50
FLDA,RELX,TEMP,1.
SOLVE !solve for temperature only
fini |
|