CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > CFX

CEL and Variables

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Display Modes
Old   June 21, 2005, 10:48
Default CEL and Variables
  #1
stex
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!!!!
  Reply With Quote

Old   June 21, 2005, 11:50
Default Re: CEL and Variables
  #2
Rui
Guest
 
Posts: n/a
Hi,

Are you using CFX-5.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
  Reply With Quote

Old   June 21, 2005, 11:51
Default Re: CEL and Variables
  #3
JP
Guest
 
Posts: n/a
try this: PT=p*T areaAve(PT)@inlet
  Reply With Quote

Old   June 21, 2005, 15:28
Default Re: CEL and Variables
  #4
Juan Carlos
Guest
 
Posts: n/a
Unfortunately, the expressions within callbacks is not supported within CFX-Pre and CFX-Solver.

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

  Reply With Quote

Old   June 22, 2005, 04:52
Default Re: CEL and Variables
  #5
stex
Guest
 
Posts: n/a
I use 5.6 version!
  Reply With Quote

Old   June 22, 2005, 04:52
Default Re: CEL and Variables
  #6
stex
Guest
 
Posts: n/a
Already done. It doesn't work
  Reply With Quote

Old   June 22, 2005, 05:33
Default Re: CEL and Variables
  #7
stex
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, right-clicking in the expression editor I cannot find "dummy" in the variable list after I've created....how it is possible Juan?

many thanks.
  Reply With Quote

Old   June 22, 2005, 05:43
Default Re: CEL and Variables
  #8
stex
Guest
 
Posts: n/a
errata corrige: Now I find the additional variable "dummy" right-clicking in the expression editor.......but the solver don't want to recognize it....
  Reply With Quote

Old   June 22, 2005, 10:15
Default Re: CEL and Variables
  #9
Rui
Guest
 
Posts: n/a
Hi,

Usually I create additional variables.For example, in CFX-Pre 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 CFX-5.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)*(1-alfa)^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
  Reply With Quote

Old   June 22, 2005, 10:45
Default Re: CEL and Variables
  #10
stex
Guest
 
Posts: n/a
Many thanks Rui, but it seems that in CFX-Pre is impossible to evaluate a areaAve (or areaInt) of a composite variable...I will try...
  Reply With Quote

Old   June 22, 2005, 10:58
Default Re: CEL and Variables
  #11
Juan Carlos
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
  Reply With Quote

Old   June 22, 2005, 11:27
Default Re: CEL and Variables
  #12
stex
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)

  Reply With Quote

Old   June 22, 2005, 12:50
Default Re: CEL and Variables
  #13
Juan Carlos
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
  Reply With Quote

Old   June 23, 2005, 06:24
Default Re: CEL and Variables
  #14
stex
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??
  Reply With Quote

Old   June 23, 2005, 08:32
Default Re: CEL and Variables
  #15
Rui
Guest
 
Posts: n/a
Hi Stex,

I have tried in CFX-5.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 CFX-5.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 CFX-5.7.

Regards,

Rui
  Reply With Quote

Old   June 23, 2005, 09:25
Default Re: CEL and Variables
  #16
stex
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
  Reply With Quote

Old   June 23, 2005, 09:37
Default Re: CEL and Variables
  #17
stex
Guest
 
Posts: n/a
PS: Rui, have you ever find a way to calculate massFLOW in a periodic boundary???

Thanks
  Reply With Quote

Old   June 23, 2005, 11:41
Default Re: CEL and Variables
  #18
Rui
Guest
 
Posts: n/a
Ciau Stex,

In both CFX-5.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 CFX-5.7.1 it's possible to calculate massFlowInt(var)@inter Side1 Boundary1 and massFlowAve(var)@inter Side1 Boundary1, while in CFX-5.6 it isn't.

To calculate the mass flow a this boundary, in CFX-5.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 x-axis, the mass flow would be areaInt(Density * u)@Periodic_boundary.If your fluid density is constant, in CFX-5.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
  Reply With Quote

Old   June 27, 2005, 05:50
Default Re: CEL and Variables
  #19
stex
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.
  Reply With Quote

Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


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


All times are GMT -4. The time now is 18:17.