找回密码
 注册
Simdroid-非首页
查看: 117|回复: 6

【讨论】怎样处理这个错误,在线等!!!

[复制链接]
发表于 2004-8-31 15:17:14 | 显示全部楼层 |阅读模式 来自 陕西西安
做一个多相流问题时,出现如下错误:
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
 楼主| 发表于 2004-8-31 15:18:47 | 显示全部楼层 来自 陕西西安

回复: 【讨论】怎样处理这个错误,在线等!!!

Simdroid开发平台
这是例子的相关图

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有账号?注册

×
 楼主| 发表于 2004-8-31 16:11:46 | 显示全部楼层 来自 陕西西安

回复: 【讨论】怎样处理这个错误,在线等!!!

这是部分节点的初始条件,明明白白  sp01+sp02=1啊。怎么还提示这个错误那???
  
LIST INITIAL CONDITIONS FOR PICKED NODES  
          ***** INITIAL DISPLACEMENTS ****
   NODE    VX          VY          VZ          PRES        TEMP        ENKE
           ENDS        SP01        SP02
      1  0.0000      0.0000      0.0000      0.0000      400.00      0.0000     
         0.0000      1.0000      0.0000     
      2  0.0000      0.0000      0.0000      0.0000      400.00      0.0000     
         0.0000      1.0000      0.0000     
      3  0.0000      0.0000      0.0000      0.0000      400.00      0.0000     
         0.0000      1.0000      0.0000     
      4  0.0000      0.0000      0.0000      0.0000      400.00      0.0000     
         0.0000      1.0000      0.0000     
      5  0.0000      0.0000      0.0000      0.0000      400.00      0.0000     
         0.0000      1.0000      0.0000     
      6  0.0000      0.0000      0.0000      0.0000      400.00      0.0000     
         0.0000      1.0000      0.0000     
      7  0.0000      0.0000      0.0000      0.0000      400.00      0.0000     
         0.0000      1.0000      0.0000     
      8  0.0000      0.0000      0.0000      0.0000      400.00      0.0000     
         0.0000      1.0000      0.0000     
      9  0.0000      0.0000      0.0000      0.0000      400.00      0.0000     
         0.0000      1.0000      0.0000     
     10  0.0000      0.0000      0.0000      0.0000      400.00      0.0000     
         0.0000      1.0000      0.0000   
 楼主| 发表于 2004-9-1 13:55:14 | 显示全部楼层 来自 陕西西安

回复: 【讨论】怎样处理这个错误,在线等!!!

这个问题好像已经解决了,为什么我也不知道,因为我就把机器重启了一下,然后重新定义了一次Initial  Conditions 里的流量组分质量分数,居然就又可以了,真是很郁闷,不知道怎么错的,也不知道怎么对的。。。。。。。。汗
发表于 2004-9-1 22:51:00 | 显示全部楼层 来自 陕西西安

回复: 【讨论】怎样处理这个错误,在线等!!!

不知道原因就解决问题了,祝贺楼主!
可惜大家不能分享你的收获:I
 楼主| 发表于 2004-9-2 13:48:36 | 显示全部楼层 来自 陕西西安

回复: 【讨论】怎样处理这个错误,在线等!!!

等我弄明白了一定和大家分享,现在没有出现那个错误我就已经很满意了,多的还没想^_^
发表于 2004-9-3 10:20:44 | 显示全部楼层 来自 上海交通大学

回复: 【讨论】怎样处理这个错误,在线等!!!

我也在做多相问题,看样子和你很相似,欢迎联系。
您需要登录后才可以回帖 登录 | 注册

本版积分规则

Simapps系列直播

Archiver|小黑屋|联系我们|仿真互动网 ( 京ICP备15048925号-7 )

GMT+8, 2024-9-22 16:38 , Processed in 0.040022 second(s), 13 queries , Gzip On, MemCache On.

Powered by Discuz! X3.5 Licensed

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表