
[Sponsors] 
July 5, 2012, 01:04 
Problems with CEL (guess it's simple to solve)

#1 
Member
Felipe Gobbi
Join Date: Apr 2012
Location: Brazil
Posts: 76
Rep Power: 5 
Hi everyone,
Recently I've developed a preliminar model to simulate air conditioning. In my model, we calculate the absolute humidity on the insuflation nozzle of the air conditioner by giving the abs humidity on the entrance of the air conditioner, temperature at the entrance and by making some assumptions. Using this on CFX is giving me some solver errors because I set the abs humidity at the entrance of the air conditioner as the Mass Fraction at the Outlet of the room (the one that returns to the AC) by defining an expression that is ave(Water Vapour at 25 C.Mass Fraction)@Outlet since my fluid is Air + Water Vapour. I've also tried the @Default Domain location so CFX could read an initial value from Initialization at my Default Domain. Since the abs humidity on the insuflation nozzle depends on the one from the entrance and the temperature at it depends on the abs humidity of the insuflation nozzle seems like the software can't get the initial input at the entrance and crashes saying: Error processing expression 'Static Temperature'. The expression is invalid because: Mass Fraction is not available for use in this term Error processing expression: Static Temperature = Ts Just for you to know, Ts is my expression for the Temperature at the insuflation nozzle set on Inlet Boundary condition and as I said, it depends on the abs humidity at the insufl nozzle. The expression is: Ts = (15.66*ln(1000*ws)21.70) [C] and again, ws depends on the abs humidity at the entrance (we) that seems to be unavaliable or cannot be read. I'm wondering how can I make CFX read the Water Vapour Mass Fraction on each iteration and do all the calculations because from what I understood, Ts cannot be calculated because the entrance properties cannot be obtained. My settings are: Air Ideal Gas (Constraint) and Water Vapour 25 C (Transport Equation) with the Water Vapour mass fraction at t=0 set to 0. Thanks in advance and sorry for the long text. Felipe. 

July 5, 2012, 05:58 

#2 
Super Moderator
Glenn Horrocks
Join Date: Mar 2009
Location: Sydney, Australia
Posts: 11,586
Rep Power: 90 
Does this work if you use a simple incompressible fluid for air? Why do you need air to be an ideal gas?


July 5, 2012, 14:45 

#3 
Member
Felipe Gobbi
Join Date: Apr 2012
Location: Brazil
Posts: 76
Rep Power: 5 
Hello Glenn,
Are you just asking me if my simulation would work if I replaced air with some incompressible fluid like any other liquid? If I did it, what benefit would this do? Wouldn't it just change my Air properties? Isn't it more realistic to make Air an ideal gas for AC applications? My point is to study how humidity behaves so I can predict what will happen when we set up an AC system in any given room. Thank you for the quick answer, I hope it'll help me! Sorry if I misunderstood you, I'm a CFX begginer, specially when talking about CEL. Felipe. 

July 5, 2012, 18:33 

#4 
Super Moderator
Glenn Horrocks
Join Date: Mar 2009
Location: Sydney, Australia
Posts: 11,586
Rep Power: 90 
For many HVAC applications modelling air as an incompressible fluid (with buoyancy) is adequate. A general rule in CFD is to use the simplest possible model, and only go to a more complex model (eg compressible air) when you have a clear reason to do so.
But regardless of whether you use comp or incomp air in the final solution, just as a debug experiment use incompressible air to see if it ersolves the error. It will give you some ideas of where the problem may lie. 

July 5, 2012, 19:45 

#5 
Member
Felipe Gobbi
Join Date: Apr 2012
Location: Brazil
Posts: 76
Rep Power: 5 
Thank you Glenn,
I'll do it and come back to post if it worked, but first gotta find out how to model air as incompressible. 

July 6, 2012, 02:03 

#6 
Super Moderator
Glenn Horrocks
Join Date: Mar 2009
Location: Sydney, Australia
Posts: 11,586
Rep Power: 90 
heat transfer model = total energy and the fluid having variable density (eg ideal gas) means compressible.
heat transfer model = none, isothermal or thermal energy = incompressible. If you want incompressible with heat transfer and buoyancy you want the thermal energy model, with gravity defined. 

July 6, 2012, 10:19 

#7 
Member
Felipe Gobbi
Join Date: Apr 2012
Location: Brazil
Posts: 76
Rep Power: 5 
Mr. Horrocks,
I always use the Thermal Energy model on HVAC, so I was unconsciously modeling air as an imcompressible fluid. When I set my entrance abs humidity (we) to a constant value instead of ave(Water Vapour at 25 C.mf)@Outlet, solver points another error instead of the error that Mass Fraction is not avaliable, that I strongly believe is an Outlet problem because solver says that a wall had been placed on the outlet to prevent fluid from flowing back to my domain and suggests to switch to an opening boundary (Overflow issue). My material is called AirH2O and is composed by Air Ideal Gas + Water Vapour at 25 C, I've set Air as Constraint and Water Vapour as Tansport Equation with its Initial mass fraction of 0 and its Inlet mass fraction as the abs humidity of the Air Conditioner nozzle. Then, this abs humidity of the nozzle depends on the abs humidity on the exhaust "hole" of the Air Conditioner which I assumed to be the Water Vapour mass fraction of the Outlet (ave(Water Vapour at 25 C.mf)@Outlet). My main problem is that the CFX says that this ave water vapour.mf isn't avaliable and therefore everything that depends on this mass fraction cannot be calculated. Why isn't it avaliable if I set the initialization properly? Sorry for another huge post, but I felt like better explaining my problem so it could be solved faster. Thanks in advance, Felipe. 

July 14, 2012, 17:15 

#8 
Member
Felipe Gobbi
Join Date: Apr 2012
Location: Brazil
Posts: 76
Rep Power: 5 
Hello everyone,
Now I come with a simple question, I've had some other problems and fixed them. Like problems with using Temperature in [C]. Now my question is that: We can request the CFXPre to use the expression ave(T)@Outlet to get us the average temperature at each iteration and use it for any purpose we want, right? Is the expression ave(Water Vapour at 25 C.Mass Fraction)@Outlet possible to use for requesting the Mass Fraction of a determined component of my fluid (Air + Water Vapour) in CFXPre or I can use it only in CFDPost? When I try to use it, the Solver crashes and says it's not avaliable, but the expression is recognized in CEL. If this command does not exist, how can I make CFXPre get the mass fraction of this component at each iteration just like I did with the temperature? I want the Solver to do the calculations iteratively and not just set a constant value for the Mass Fraction, otherwise it would lack precision. Thanks 

July 15, 2012, 08:26 

#9  
Super Moderator
Glenn Horrocks
Join Date: Mar 2009
Location: Sydney, Australia
Posts: 11,586
Rep Power: 90 
Quote:
You can use ave(fluid.Mass Fraction)@... in the solver. But the above comment applies  massflowave()@... is a better function in most cases. If the solver is saying this is not available  is it the ave function or your variable (Water Vapour at 25C) which does not exist? Please post the output file so we can see the error message. 

July 15, 2012, 22:24 

#10 
Member
Felipe Gobbi
Join Date: Apr 2012
Location: Brazil
Posts: 76
Rep Power: 5 
Horrocks,
Here's what the Solver points: Error processing expression 'Static Temperature'. The expression is invalid because: Mass Fraction is not available for use in this term Error processing expression: Static Temperature = Ts ++  An error has occurred in cfx5solve:     C:\Program Files\ANSYS Inc\v130\CFX\bin\winntamd64\ccl2flow.exe   was interrupted by signal QUIT (3)  ++ This run of the ANSYS CFX Solver has finished. Explaining the error in Static Temperature = Ts: I've set the Inlet temperature as Static Temperature and enabled the expression button by setting it like Ts = 15.66*ln(1000*ws)  21.7 ws is the abs humidity... and it depends on the Outlet Mass Fraction which is the ave(Water Vapour at 25 C.Mass Fraction)@Outlet that I need! Briefly, I need the Outlet Mass Fraction at each iteration to calculate ws and then calculate Ts. Thanks. 

July 16, 2012, 08:18 

#11 
Super Moderator
Glenn Horrocks
Join Date: Mar 2009
Location: Sydney, Australia
Posts: 11,586
Rep Power: 90 
Please post the output file so we can see the error message. Your snippet does not tell us much.


July 16, 2012, 09:24 

#12 
Member
Felipe Gobbi
Join Date: Apr 2012
Location: Brazil
Posts: 76
Rep Power: 5 
Here's the whole output report:
This run of the CFX13.0 Solver started at 10:21:48 on 16 Jul 2012 by user 69560 on PC5 (intel_xeon64.sse2_winnt) using the command: "C:\Program Files\ANSYS Inc\v130\CFX\bin\perllib\cfx5solve.pl" batch ccl runInput.ccl fullname "Malha Helton Teste_001" Setting up CFX Solver run ... ++    CFX Command Language for Run    ++ LIBRARY: CEL: EXPRESSIONS: A =  2940.94 [kJ/kg] B = \ (1243+(1.82*(15.66*ln(1000*we)21.70))+2500.8+5203.2*we+2.92+2500.9) \ [kJ/kg] C = (Q/0.547 [kg/s]) + (1.005 [kJ kg^1]*Te) + (1.82 [kJ kg^1] * \ we * Te) + (1.82 [kJ kg^1] * we * Tsat) + (2500.8 [kJ/kg] * we) + \ (1.233 [kJ/kg]) + (5.16 [kJ/kg] * we) + (2500.9 [kJ/kg] * we) Q = 10.55 [kW] Ta = (massFlowAve(T)@Outlet / 1 [K])  273.15 Te = Ta Ts = (15.66*ln(1000*ws)21.695) [C] Tsat = (15.66*ln(1000*we)21.695) wa = massFlowAve(Water Vapour at 25 C.Mass Fraction)@Outlet we = wa ws = B*(2*A)^1 + ((B^2  4*A*C)^0.5)*(2*A)^1 END END MATERIAL: Air at 25 C Material Description = Air at 25 C and 1 atm (dry) Material Group = Air Data, Constant Property Gases Option = Pure Substance Thermodynamic State = Gas PROPERTIES: Option = General Material EQUATION OF STATE: Density = 1.185 [kg m^3] Molar Mass = 28.96 [kg kmol^1] Option = Value END SPECIFIC HEAT CAPACITY: Option = Value Specific Heat Capacity = 1.0044E+03 [J kg^1 K^1] Specific Heat Type = Constant Pressure END REFERENCE STATE: Option = Specified Point Reference Pressure = 1 [atm] Reference Specific Enthalpy = 0. [J/kg] Reference Specific Entropy = 0. [J/kg/K] Reference Temperature = 25 [C] END DYNAMIC VISCOSITY: Dynamic Viscosity = 1.831E05 [kg m^1 s^1] Option = Value END THERMAL CONDUCTIVITY: Option = Value Thermal Conductivity = 2.61E02 [W m^1 K^1] END ABSORPTION COEFFICIENT: Absorption Coefficient = 0.01 [m^1] Option = Value END SCATTERING COEFFICIENT: Option = Value Scattering Coefficient = 0.0 [m^1] END REFRACTIVE INDEX: Option = Value Refractive Index = 1.0 [m m^1] END THERMAL EXPANSIVITY: Option = Value Thermal Expansivity = 0.003356 [K^1] END END END MATERIAL: AirH2O Material Group = User Materials List = Air at 25 C,Water Vapour at 25 C Option = Variable Composition Mixture Thermodynamic State = Gas END MATERIAL: Water Vapour at 25 C Material Description = Water (saturated vapour) at 25 C Material Group = Water Data, Constant Property Gases, Interphase Mass \ Transfer Option = Pure Substance Thermodynamic State = Gas PROPERTIES: Option = General Material EQUATION OF STATE: Density = 0.02308 [kg m^3] Molar Mass = 18.02 [kg kmol^1] Option = Value END SPECIFIC HEAT CAPACITY: Option = Value Specific Heat Capacity = 1911.6 [J kg^1 K^1] Specific Heat Type = Constant Pressure END REFERENCE STATE: Option = Specified Point Reference Pressure = 3.169E2 [bar] Reference Specific Enthalpy = 1.3424249E+7 [J/kg] Reference Specific Entropy = 1.0475125E+04 [J/kg/K] Reference Temperature = 25 [C] END DYNAMIC VISCOSITY: Dynamic Viscosity = 9.8626E06 [kg m^1 s^1] Option = Value END THERMAL CONDUCTIVITY: Option = Value Thermal Conductivity = 0.01854 [W m^1 K^1] END ABSORPTION COEFFICIENT: Absorption Coefficient = 1.0 [m^1] Option = Value END SCATTERING COEFFICIENT: Option = Value Scattering Coefficient = 0.0 [m^1] END REFRACTIVE INDEX: Option = Value Refractive Index = 1.0 [m m^1] END THERMAL EXPANSIVITY: Option = Value Thermal Expansivity = 0.003356 [K^1] END END END END FLOW: Flow Analysis 1 SOLUTION UNITS: Angle Units = [rad] Length Units = [m] Mass Units = [kg] Solid Angle Units = [sr] Temperature Units = [K] Time Units = [s] END ANALYSIS TYPE: Option = Transient EXTERNAL SOLVER COUPLING: Option = None END INITIAL TIME: Option = Automatic with Value Time = 0 [s] END TIME DURATION: Option = Total Time Total Time = 10 [s] END TIME STEPS: Option = Timesteps Timesteps = 1 [s] END END DOMAIN: Default Domain Coord Frame = Coord 0 Domain Type = Fluid Location = BODY BOUNDARY: Default Domain Default Boundary Type = WALL Location = INLET1,PAREDES,PISO,Primitive 2D,Primitive 2D A,Primitive \ 2D B,Primitive 2D C,Primitive 2D D,Primitive 2D E,Primitive 2D \ F,Primitive 2D G,Primitive 2D H,Primitive 2D I,Primitive 2D \ J,Primitive 2D K,TETO BOUNDARY CONDITIONS: HEAT TRANSFER: Option = Adiabatic END MASS AND MOMENTUM: Option = No Slip Wall END WALL ROUGHNESS: Option = Smooth Wall END END END BOUNDARY: Inlet Boundary Type = INLET Location = INLET2 BOUNDARY CONDITIONS: COMPONENT: Water Vapour at 25 C Mass Fraction = ws Option = Mass Fraction END FLOW DIRECTION: Option = Normal to Boundary Condition END FLOW REGIME: Option = Subsonic END HEAT TRANSFER: Option = Static Temperature Static Temperature = Ts END MASS AND MOMENTUM: Mass Flow Rate = 0.546 [kg s^1] Option = Mass Flow Rate END TURBULENCE: Option = Medium Intensity and Eddy Viscosity Ratio END END END BOUNDARY: Outlet Boundary Type = OUTLET Location = OUTLET BOUNDARY CONDITIONS: FLOW REGIME: Option = Subsonic END MASS AND MOMENTUM: Option = Static Pressure Relative Pressure = 0 [Pa] END END END DOMAIN MODELS: BUOYANCY MODEL: Buoyancy Reference Density = 1.2 [kg m^3] Gravity X Component = 0 [m s^2] Gravity Y Component = g Gravity Z Component = 0 [m s^2] Option = Buoyant BUOYANCY REFERENCE LOCATION: Option = Automatic END END DOMAIN MOTION: Option = Stationary END MESH DEFORMATION: Option = None END REFERENCE PRESSURE: Reference Pressure = 1 [atm] END END FLUID DEFINITION: AirH2O Material = AirH2O Option = Material Library MORPHOLOGY: Option = Continuous Fluid END END FLUID MODELS: COMBUSTION MODEL: Option = None END COMPONENT: Air at 25 C Option = Constraint END COMPONENT: Water Vapour at 25 C Option = Transport Equation END HEAT TRANSFER MODEL: Option = Thermal Energy END THERMAL RADIATION MODEL: Option = None END TURBULENCE MODEL: Option = k epsilon BUOYANCY TURBULENCE: Option = None END END TURBULENT WALL FUNCTIONS: Option = Scalable END END INITIALISATION: Option = Automatic INITIAL CONDITIONS: Velocity Type = Cartesian CARTESIAN VELOCITY COMPONENTS: Option = Automatic with Value U = 0 [m s^1] V = 0 [m s^1] W = 0 [m s^1] END COMPONENT: Water Vapour at 25 C Mass Fraction = 0.01 Option = Automatic with Value END STATIC PRESSURE: Option = Automatic with Value Relative Pressure = 0 [Pa] END TEMPERATURE: Option = Automatic with Value Temperature = 25 [C] END TURBULENCE INITIAL CONDITIONS: Option = Medium Intensity and Eddy Viscosity Ratio END END END END OUTPUT CONTROL: MONITOR OBJECTS: MONITOR BALANCES: Option = Full END MONITOR FORCES: Option = Full END MONITOR PARTICLES: Option = Full END MONITOR POINT: MP 1 Mass Fraction Outlet Cartesian Coordinates = 2.56 [m], 2.24 [m], 2.56 [m] Option = Cartesian Coordinates Output Variables List = Water Vapour at 25 C.Mass Fraction END MONITOR POINT: MP 2 Mass Fraction Inlet Cartesian Coordinates = 2.56 [m], 2.32 [m], 2.24 [m] Option = Cartesian Coordinates Output Variables List = Water Vapour at 25 C.Mass Fraction END MONITOR POINT: MP 3 Temperature Outlet Cartesian Coordinates = 2.56 [m], 2.24 [m], 2.56 [m] Option = Cartesian Coordinates Output Variables List = Temperature END MONITOR POINT: MP 4 Temperature Inlet Cartesian Coordinates = 2.56 [m], 2.32 [m], 2.24 [m] Option = Cartesian Coordinates Output Variables List = Temperature END MONITOR RESIDUALS: Option = Full END MONITOR TOTALS: Option = Full END END RESULTS: Extra Output Variables List = Water Vapour at 25 C.Mass Fraction File Compression Level = Default Option = Standard END TRANSIENT RESULTS: Transient Results 1 File Compression Level = Default Option = Standard OUTPUT FREQUENCY: Option = Every Timestep END END END SOLVER CONTROL: Turbulence Numerics = First Order ADVECTION SCHEME: Option = High Resolution END CONVERGENCE CONTROL: Maximum Number of Coefficient Loops = 10 Minimum Number of Coefficient Loops = 1 Timescale Control = Coefficient Loops END CONVERGENCE CRITERIA: Residual Target = 1.E4 Residual Type = RMS END TRANSIENT SCHEME: Option = Second Order Backward Euler TIMESTEP INITIALISATION: Option = Automatic END END END END COMMAND FILE: Version = 13.0 Results Version = 13.0 END SIMULATION CONTROL: EXECUTION CONTROL: EXECUTABLE SELECTION: Double Precision = Off END INTERPOLATOR STEP CONTROL: Runtime Priority = Standard MEMORY CONTROL: Memory Allocation Factor = 1.0 END END PARALLEL HOST LIBRARY: HOST DEFINITION: pc5 Host Architecture String = winntamd64 Installation Root = C:\Program Files\ANSYS Inc\v%v\CFX END END PARTITIONER STEP CONTROL: Multidomain Option = Independent Partitioning Runtime Priority = Standard EXECUTABLE SELECTION: Use Large Problem Partitioner = Off END MEMORY CONTROL: Memory Allocation Factor = 1.0 END PARTITIONING TYPE: MeTiS Type = kway Option = MeTiS Partition Size Rule = Automatic END END RUN DEFINITION: Run Mode = Full Solver Input File = Malha Helton Teste.def END SOLVER STEP CONTROL: Runtime Priority = Standard MEMORY CONTROL: Memory Allocation Factor = 1.0 END PARALLEL ENVIRONMENT: Number of Processes = 1 Start Method = Serial END END END END Error processing expression 'Static Temperature'. The expression is invalid because: Mass Fraction is not available for use in this term Error processing expression: Static Temperature = Ts ++  An error has occurred in cfx5solve:     C:\Program Files\ANSYS Inc\v130\CFX\bin\winntamd64\ccl2flow.exe   was interrupted by signal QUIT (3)  ++ This run of the ANSYS CFX Solver has finished. 

July 16, 2012, 12:14 

#13 
Member
Join Date: Dec 2009
Posts: 30
Rep Power: 8 
The problem is that in CFX the Dependency List for the parameter Static Temperature is restricted to a small set of solution variables (you can see these by looking in the RULES file). The list does not include mass fraction.
You can work around the problem by including a CCL snippet in your command file to extend the list; however, whilst this may get around the check it may produce unpredicatable results in the solver (these lists are usually restricted for good reason). CG 

July 16, 2012, 13:42 

#14 
Member
Felipe Gobbi
Join Date: Apr 2012
Location: Brazil
Posts: 76
Rep Power: 5 
And do you know how can I add this variable there?
I have no idea how to edit the command list to include it. Thanks for the help! 

July 16, 2012, 16:50 

#15 
Member
Join Date: Dec 2009
Posts: 30
Rep Power: 8 
You need to add:
RULES: PARAMETER: Static Temperature Dependency List = {original dependency list}, mf END END by editing your CCL file manually. The {original dependency list} can be found by looking in the RULES file. CG 

July 16, 2012, 21:20 

#16 
Member
Felipe Gobbi
Join Date: Apr 2012
Location: Brazil
Posts: 76
Rep Power: 5 
Gremlin,
I've modified the RULES file, it worked! Now I gotta fix another error here. Thank you. 

July 16, 2012, 22:57 

#17 
Super Moderator
Glenn Horrocks
Join Date: Mar 2009
Location: Sydney, Australia
Posts: 11,586
Rep Power: 90 
Maybe, but do not assume that it has fully worked without checking. There is a good reason why it is not in there by default.


July 17, 2012, 09:42 

#18 
Member
Felipe Gobbi
Join Date: Apr 2012
Location: Brazil
Posts: 76
Rep Power: 5 
That's true, I'm monitoring it to make sure it won't give me any wrong value. Otherwise I will need to find another way to solve my problem.
Thanks for the reminder 

July 17, 2012, 16:42 

#19 
Member
Felipe Gobbi
Join Date: Apr 2012
Location: Brazil
Posts: 76
Rep Power: 5 
Hello guys,
Another doubt came up to me... Is it possible for me to request a propertie or variable value at a determined time step on CFXPre? For instance, get the Mass Fraction at t=5s and use it for any purpose. 

July 17, 2012, 19:19 

#20 
Super Moderator
Glenn Horrocks
Join Date: Mar 2009
Location: Sydney, Australia
Posts: 11,586
Rep Power: 90 
There are many ways to do this, you can define monitor points and export it after the run, you can extract things during post processing.
What are you trying to do? 

Thread Tools  
Display Modes  


Similar Threads  
Thread  Thread Starter  Forum  Replies  Last Post 
SIMPLE algorithm in 3D cylindrical coordinates  zouchu  Main CFD Forum  1  January 20, 2014 18:02 
my simple stokes does not work  Juergen Kertz  Main CFD Forum  8  December 19, 2005 02:40 
how cfd package helps to solve problems in I.C eng  vivekanand  Main CFD Forum  0  October 27, 2004 05:10 
How to solve exactly Riemann problems?  Matthew Xu  Main CFD Forum  3  September 20, 2004 13:28 
extremely simple problem... can you solve it properly?  Mikhail  Main CFD Forum  40  September 9, 1999 09:11 