
[Sponsors] 
June 21, 2005, 10:48 
CEL and Variables

#1 
Guest
Posts: n/a

I'm working with CEL in Pre.
Usually you need to evaluate areaAve(<variable>)@Plane and it works. I tried areaAve(<variable1> * <variable2>)@Plane and it doesn't work......anyone knows why?!?! e.g. areaAve(p)@inlet > OK areaAve(p*T)@inlet > PROBLEMS!!!! 

June 21, 2005, 11:50 
Re: CEL and Variables

#2 
Guest
Posts: n/a

Hi,
Are you using CFX5.7?In Post, <font color="blue">function(variable1*variable2)@locator </font> doesn't work in version 5.7, but it works in versions 5.6 and 5.7.1.So, the same may happen in Pre. Regards, Rui 

June 21, 2005, 11:51 
Re: CEL and Variables

#3 
Guest
Posts: n/a

try this: PT=p*T areaAve(PT)@inlet


June 21, 2005, 15:28 
Re: CEL and Variables

#4 
Guest
Posts: n/a

Unfortunately, the expressions within callbacks is not supported within CFXPre and CFXSolver.
However, there is a workaround. Create an Algebraic Equation Additional Variable equal to your expression, and apply the callback function on this new variable. Good luck, Juan Carlos 

June 22, 2005, 04:52 
Re: CEL and Variables

#5 
Guest
Posts: n/a

I use 5.6 version!


June 22, 2005, 04:52 
Re: CEL and Variables

#6 
Guest
Posts: n/a

Already done. It doesn't work


June 22, 2005, 05:33 
Re: CEL and Variables

#7 
Guest
Posts: n/a

Thanks for the good idea. I tried:
LIBRARY: ADDITIONAL VARIABLE: dummy Option = Algebraic Equation Additional Variable Value = 2 * T Units = [ K ] Variable Type = Unspecified END # ADDITIONAL VARIABLE:dummy END # LIBRARY: just to try a dummy variable ( 2 * temperature) , but when I call the variable in the expression editor (e.g.: dummyAVE = areaAve(dummy)@Plane1) I've no problems. The problem is in the SOLVER, because it writes: "Error in setting: "dummyAVE" via the expression: areaAve(dummy)@Plane1 areaAve( : read successfully, and then error found at item: dummy unrecognised name Error processing expression: Expression Value = dummyAVE" Moreover in PRE, rightclicking in the expression editor I cannot find "dummy" in the variable list after I've created....how it is possible Juan? many thanks. 

June 22, 2005, 05:43 
Re: CEL and Variables

#8 
Guest
Posts: n/a

errata corrige: Now I find the additional variable "dummy" rightclicking in the expression editor.......but the solver don't want to recognize it....


June 22, 2005, 10:15 
Re: CEL and Variables

#9 
Guest
Posts: n/a

Hi,
Usually I create additional variables.For example, in CFXPre I create a new variable Source heat set the type to Unspecified and the units to [J m^3 s^1], I create an expression Sq, and when I define the Domain, in the Fluid Models tab I select the variable Source heat chose the option Algebaric Equation and set it to expression Sq. And in CFX5.6 the .ccl and the .out files are like this (which looks a little bit different from what you posted): LIBRARY : ADDITIONAL VARIABLE : Source heat Option = Definition Units = [ J m^3 s^1 ] Variable Type = Unspecified END ..... ..... CEL : EXPRESSIONS : ..... ..... Sq = Hr*Km*(Co^2)*(1alfa)^2 ..... ..... END END END FLOW : ..... ..... DOMAIN : Domain 1 ..... ..... FLUID MODELS : ..... ..... ADDITIONAL VARIABLE : Source heat Additional Variable Value = Sq Option = Algebraic Equation END END END ..... ..... ENDRegards, Rui 

June 22, 2005, 10:45 
Re: CEL and Variables

#10 
Guest
Posts: n/a

Many thanks Rui, but it seems that in CFXPre is impossible to evaluate a areaAve (or areaInt) of a composite variable...I will try...


June 22, 2005, 10:58 
Re: CEL and Variables

#11 
Guest
Posts: n/a

Hi,
I just repeated your example above, and it works for me.. Are you sure there isn't a typo that we cannot see because of the html? Is Plane 1 a boundary condition location? The CFX solver only supports callback on location that are either boundaries, subdomain, domain, monitor points or source points. Plane 1 sounds like a user defined location in the middle of a domain. Good luck, Juan Carlos 

June 22, 2005, 11:27 
Re: CEL and Variables

#12 
Guest
Posts: n/a

no, plane1 is a periodic boundary.
The methodology you suggest works for entities like density, temperature, but I tried with velocity and in that case the solver write "Details of error:  Error detected by routine PEEKCA CDANAM = /FLOW/GETVAR/MESH_DIR/CZIF CRESLT = NONE ++  Writing crash recovery file  ++ ++  ERROR #001100279 has occurred in subroutine ErrAction.   Message:   Stopped in routine MEMERR            ++ My problem is that I would like to write an expression of the moment source in function of the areaAve(density* vel) 

June 22, 2005, 12:50 
Re: CEL and Variables

#13 
Guest
Posts: n/a

Stex,
density * vel is a vector and you are using a Algebraic scalar equation. It is not what you want, I believe. Have you tried using the velocity components as  Av expression 1= density*u  Av expression 2= density*v  ... and use them individually in the momemtum source.. I am guessing here since I do not know what you are trying to do.. Perhaps the callback function are not fully supported on periodic domain interfaces..Have you tried using on WALL or INLET, just to verify your syntax is correct. Are you using 5.7.1 or 5.6? I would not continue unless you check with support and they confirm it should work on either of them. Regards, Juan Carlos 

June 23, 2005, 06:24 
Re: CEL and Variables

#14 
Guest
Posts: n/a

Dear Juan, now I can explain.......I did many tests. So,let's try a simple case, you can try by yourself if you don't believe me.
if you define in Pre an expression as areaAve(u)@Periodic_boundary ....it works. if you define a additional variable u_new with an algebraic equation u_new = u and then you change the expression like this... areaAve(u_new)@Periodic_boundary ....it doesn't works. Why is not possible?? 

June 23, 2005, 08:32 
Re: CEL and Variables

#15 
Guest
Posts: n/a

Hi Stex,
I have tried in CFX5.6: areaAve(T)@boundary and areaAve(u)@boundary work for all type of boundaries Variable T_new = T, areaAve(T_new) works for all type of boundaries Variable u_new = u, areaAve(u_new) works for all type of boundaries <u>except periodic boundaries</u>. I got the same error as you: Error detected by routine PEEKCA CDANAM = /FLOW/GETVAR/MESH_DIR/CZIF CRESLT = NONE I tried in CFX5.7.1 (with SP1): Variable u_new = u, areaAve(u_new) works for <u>all type of boundaries</u>. So it seems it was some problem that has been fixed in CFX5.7. Regards, Rui 

June 23, 2005, 09:25 
Re: CEL and Variables

#16 
Guest
Posts: n/a

In fact I use 5.6, and I just finish to try all the variables and boundary as you did. Thanks for all your kindness. I hope we will keep in contact.
stpieri@units.it Regards 

June 23, 2005, 09:37 
Re: CEL and Variables

#17 
Guest
Posts: n/a

PS: Rui, have you ever find a way to calculate massFLOW in a periodic boundary???
Thanks 

June 23, 2005, 11:41 
Re: CEL and Variables

#18 
Guest
Posts: n/a

Ciau Stex,
In both CFX5.6 and 5.7.1, when calculating massFlow()@inter Side1 Boundary1 (inter was defined as a Periodic Domain Interface), I got this error message:ERROR #001100279 has occurred in subroutine ErrAction. Message: An invalid request to calculate IP mass flows was found for the s ymmetry or periodic boundary named: inter Side1 Boundary1However, in CFX5.7.1 it's possible to calculate massFlowInt(var)@inter Side1 Boundary1 and massFlowAve(var)@inter Side1 Boundary1, while in CFX5.6 it isn't. To calculate the mass flow a this boundary, in CFX5.7 you can do something like areaInt(Density * Velocity dot n)@Periodic_boundary, where n is the outward normal vector. If the boundary is perpendicular to the xaxis, the mass flow would be areaInt(Density * u)@Periodic_boundary.If your fluid density is constant, in CFX5.6 you can create an expression to calculate the volume flow as Vflow = areaInt(u)@Periodic_boundary, and create another expression to calculate the mass flow as Mflow = Vflow * Density. But if the fluid density isn't constant, it seems there is no way to calculate the mass flow at a periodic boundary. But I think you should contact the CFX support and ask them how to have the mass flow through a periodic boundary available at the Solver. Regards, Rui 

June 27, 2005, 05:50 
Re: CEL and Variables

#19 
Guest
Posts: n/a

"ERROR #001100279 has occurred in subroutine ErrAction."
Yes, I know this ERROR... Now I've just installed 5.7 ....so right now I can calculate the massFlowAve(Temperature)@Periodic_boundary and I'm really happy about it....... I've got the last problem with the mass flow....infact I defined a Den_U=density*u variable, but I' ve the same error when I evaluate the areaInt(Den_U)@Periodic_boundary so (as you suggested) the solution is to setup a constant density and calculate the areaInt(u)@Periodic_boundary. This solution works, but is not really what I want...so I will contact CFX support. Thanks. 

Thread Tools  
Display Modes  


Similar Threads  
Thread  Thread Starter  Forum  Replies  Last Post 
ADDITIONAL VARIABLES LIMITERS  N.P  CFX  5  December 1, 2011 08:47 
reynolds stress components in CEL  Roberto  CFX  0  December 3, 2008 04:29 
Using variables from monitor points with CEL  Robert Stevens  CFX  1  June 25, 2008 02:04 
CEL help!  CC  CFX  3  September 24, 2007 08:56 
Aditional variables in BC for wall  Henry  CFX  1  March 30, 2005 13:50 