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

CEL CONTINUATION

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

Reply
 
LinkBack Thread Tools Display Modes
Old   September 1, 2005, 09:19
Default CEL CONTINUATION
  #1
Camilo Costa
Guest
 
Posts: n/a
Dears Members of FORUM. I losta my post and replicas. Because this, i start new post here that is the continuation of lost post. THX!!

Rui post this:

Hi,

If you try to use that expression, you'll see it doesn't work. Why? Because step(Water.vf-1) isn't any average results, it will vary from point to point, and consequently the whole expression will also vary from point to point.

Are you dealing with a free-surface flow? If so, and if want to obtain the average water temperature in Post, you could create a Volume (Water.vf > 0.5), and calculate the average temperature as volumeAve(Water.T)@Volume; if you want to have the average water temperature available to the Solver, you could use the expression volumeInt(Water.T*step(Water.vf-0.5))/volumeInt(step(Water.vf-0.5)), you could also use this expression in Post.

If you're not dealing with a free-surface flow, you could use the expression volumeInt(Water.T*Water.vf)/volumeInt(Water.vf). Actually you could also use this expression for a free-surface flow, it shall give a result close to the previous one.

Which version of CFX are you using? Because I think that function(variableA*variableB) doesn't work for some versions of CFX.

Regards,

Rui

P.S.: By the way, are you Portuguese?

And i post this:

I am brazilian and I use CFX10.

I sugest one correction for the first equation of Rui and i put this:

volumeInt(Water.T*Water.vf)@MyDomain/volumeInt(Water.vf)@MyDomain.

But CFX10 acussed one error, like presented here: ERROR Attempt to evaluate the CEL callback function 'volumeInt'. Although it is valid to create an expression that uses such a function, the preprocessor does not support its evaluation.

THX!!

  Reply With Quote

Old   September 1, 2005, 10:32
Default Re: CEL CONTINUATION
  #2
Rui
Guest
 
Posts: n/a
Hi,

On my expressions I forgot to type @MyDomain.

Is that exactly the error message given by CFX-10 Pre? I believe CFX-5.6 supported function(VariableA,VariableB), while the more recent versions don't. But perhaps, just the Post did, I'm not quite sure. The workaround is to create and additional variable (let's call it adVar1) equal to Water.T*Water.vf, and instead of the expression volumeInt(<u>Water.T*Water.vf</u>)@MyDomain / volumeInt(Water.vf)@MyDomain, use the expression volumeInt(<u>adVar1</u>)@MyDomain / volumeInt(Water.vf)@MyDomain

Regards,

Rui

  Reply With Quote

Old   September 1, 2005, 11:34
Default Re: CEL CONTINUATION
  #3
Camilo Costa
Guest
 
Posts: n/a
Dear Rui, i make your suggested modifications and i substitute the fluid water for my fluid Asf (Asphalt) and CFX10 post one error that as follow describe here:

The function 'volumeInt' referenced in parameter 'Buoyancy Reference Temperature' in object '/FLOW/DOMAIN:MIX AR ASF/FLUID:Asf/FLUID MODELS/FLUID BUOYANCY MODEL' has an invalid argument, 'adVar1'. Only arguments that consist of a single variable name are supported by the solver.

The modifications is:

Tref = volumeInt(adVar1)@MIX AR ASF/volumeInt(Asf.vf)@MIX AR ASF

adVar1 = Asf.T*Asf.vf
  Reply With Quote

Old   September 1, 2005, 12:50
Default Re: CEL CONTINUATION
  #4
Rui
Guest
 
Posts: n/a
Hi,

For what I understood, you didn't create an additional variable, you just created an expression called adVar.

You have to create an expression called, for example, Expression1, and you have to create an additional variable called adVar1 (with units: [K] (the units of T*vf), and variable type: Unspecified).Then, on the Domain window, on the Asfalt tab, set the adVar1 Option to Algebraic Equation and the Additional Variable Value to Expression1.

If you want to monitor the Tref value in CFX-Solver, on the Output Control window, Monitor Points tab, create a new monitor point called, for example, Treference (the name cannot be the same used in expressions), Option: Expression and Expression Value: Tref

Hope this helps.

Regards,

Rui
  Reply With Quote

Old   September 1, 2005, 15:27
Default Re: CEL CONTINUATION
  #5
Camilo Costa
Guest
 
Posts: n/a
Dear Rui.

I make your modifications and function perfectly. Tanks a lot.

Where i find more information about CEL and your functions, variables, etc, because i want learn how program use FORTRAN for implementation my routines in CFX.

Regards,

Camilo Costa.

Ps.: Where you from?
  Reply With Quote

Old   September 1, 2005, 16:10
Default Re: CEL CONTINUATION
  #6
Rui
Guest
 
Posts: n/a
Hi,

You can find more information about CEL (CFX Expression Language) on the Documentation, Reference Guide , CFX Expression Language. You can also see the use of CEL in Tutorials 3, 4, 7, 9, 10, 11, 13 and 18.

I've never used Fortran in CFX, I never needed to. But I suppose that depends on what you're gonna do.

Regards,

Rui

P.S.: Sou Português
  Reply With Quote

Old   September 1, 2005, 17:47
Default Re: CEL CONTINUATION
  #7
Camilo Costa
Guest
 
Posts: n/a
Olá Rui.

Voçe (Tu) entende o meu português corretamente ou existe diferenças?

Obrigado pelas respostas!!!

Quando vier ao Brasil, se quiser pode ir me visitar que será bem vindo!! Abraços.

Atenciosamente Camilo Costa.

Meu msn: camilo_costa@hotmail.com
  Reply With Quote

Old   September 2, 2005, 08:27
Default More on Problem
  #8
Camilo Costa
Guest
 
Posts: n/a
+--------------------------------------------------------------------+ | ERROR #001100279 has occurred in subroutine ErrAction. | | Message: | | An error: Illegal variable: in call back function volumeInt on lo- | | cale TANK2D | | | | | | | | | +--------------------------------------------------------------------+

+--------------------------------------------------------------------+ | Writing crash recovery file | +--------------------------------------------------------------------+

Details of error:- ---------------- Error detected by routine FNDFIL CFNAME = * CRESLT = OLD

+--------------------------------------------------------------------+ | An error has occurred in cfx5solve: | | | | The CFX-5 solver exited with return code 1. No results file has | | been created. | +--------------------------------------------------------------------+

End of solution stage.

+--------------------------------------------------------------------+ | Warning! | | | | The CFX-5 Solver has written a crash recovery file. This file has | | been saved as D:\caso02\Casos\tank2dv02_003.res.err and may be an | | aid to diagnosing the problem or restarting the run. More details | | should be available in the solver output section of the output | | file. Note that a lock file was left for the crash file when the | | solver exited, and so it is probably incomplete. | +--------------------------------------------------------------------+

  Reply With Quote

Old   September 2, 2005, 11:55
Default Re: More on Problem
  #9
Rui
Guest
 
Posts: n/a
Hi Camilo,

What is TANK2D? Is it a surface?If it is, you have to use areaInt instead of volumeInt.
  Reply With Quote

Old   September 3, 2005, 11:31
Default Re: More on Problem
  #10
Camilo Costa
Guest
 
Posts: n/a
TANK2D IS MY DOMAIN
  Reply With Quote

Old   September 7, 2005, 08:00
Default Re: More on Problem
  #11
Camilo Costa
Guest
 
Posts: n/a
Olá Rui.

Eu mudei de e-mail. Meu novo e-mail é: costa_augusto@labsolar.ufsc.br

Mande um e-mail para mim, pois eu perdi seu e-mail!!

Abraços.
  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
Angle variable under CEL. Gloria Gaynor CFX 11 November 26, 2012 07:29
Using CEL to make a 'flap' move bramdiff CFX 7 October 12, 2010 10:56
junction box routine and CEL function bornspur CFX 2 February 3, 2009 03:24
Using CEL Funtion jaiye CFX 6 August 18, 2008 19:37
Rotate node via cel Elian81 CFX 2 September 25, 2007 05:31


All times are GMT -4. The time now is 06:00.