|
[Sponsors] |
September 1, 2005, 10:19 |
CEL CONTINUATION
|
#1 |
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!! |
|
September 1, 2005, 11:32 |
Re: CEL CONTINUATION
|
#2 |
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 |
|
September 1, 2005, 12:34 |
Re: CEL CONTINUATION
|
#3 |
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 |
|
September 1, 2005, 13:50 |
Re: CEL CONTINUATION
|
#4 |
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 |
|
September 1, 2005, 16:27 |
Re: CEL CONTINUATION
|
#5 |
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? |
|
September 1, 2005, 17:10 |
Re: CEL CONTINUATION
|
#6 |
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 |
|
September 1, 2005, 18:47 |
Re: CEL CONTINUATION
|
#7 |
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 |
|
September 2, 2005, 09:27 |
More on Problem
|
#8 |
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. | +--------------------------------------------------------------------+ |
|
September 2, 2005, 12:55 |
Re: More on Problem
|
#9 |
Guest
Posts: n/a
|
Hi Camilo,
What is TANK2D? Is it a surface?If it is, you have to use areaInt instead of volumeInt. |
|
September 3, 2005, 12:31 |
Re: More on Problem
|
#10 |
Guest
Posts: n/a
|
TANK2D IS MY DOMAIN
|
|
September 7, 2005, 09:00 |
Re: More on Problem
|
#11 |
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. |
|
Thread Tools | Search this Thread |
Display Modes | |
|
|
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 11:56 |
junction box routine and CEL function | bornspur | CFX | 2 | February 3, 2009 03:24 |
Using CEL Funtion | jaiye | CFX | 6 | August 18, 2008 20:37 |
Rotate node via cel | Elian81 | CFX | 2 | September 25, 2007 06:31 |