CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   CFX (https://www.cfd-online.com/Forums/cfx/)
-   -   derivative in CEL expressions (https://www.cfd-online.com/Forums/cfx/82488-derivative-cel-expressions.html)

Hemo October 13, 2011 05:21

Sorry Marjan, that's about the limit of my knowledge on the subject. Let us know if you find a solution!

happy March 15, 2012 02:58

Quote:

Originally Posted by singer1812 (Post 285581)
No need to use user Fortran. As an example, edit the additional variable in your LIBRARY with the update loop as follows:

ADDITIONAL VARIABLE: OldVel
Option = Definition
Tensor Type = SCALAR
Units = [m s^-1]
Variable Type = Specific
Update Loop = TRANS_LOOP
END

You can then use this to create your derivative.

does any one help me understand how the
Update Loop = TRANS_LOOP]

added to additional variable commands??
need more explaintions please, ASAP:o

happy April 5, 2012 03:08

Quote:

Originally Posted by happy (Post 349530)
does any one help me understand how the
Update Loop = TRANS_LOOP]

added to additional variable commands??
need more explaintions please, ASAP:o

No one can help you happy!!!

singer1812 April 5, 2012 08:51

What do you want to know?

happy April 6, 2012 01:27

how I can add update loop into my AV?&How we apply derivative at B.Cs
 
Quote:

Originally Posted by happy (Post 349530)
does any one help me understand how the
Update Loop = TRANS_LOOP]

added to additional variable commands??
need more explaintions please, ASAP:o

first, how I can add update loop into my AV. I've tried using comand editor, but when I open it again, I found it is gone!!!. After you show me how it is done. How I can use AV to create derivative - is that by cel expression?

Quote:

Originally Posted by singer1812 (Post 353293)
What do you want to know?

Hi singer 1812
Actually, I would like to apply derivative w. r. t. distance at my b.Cs for u, v,w,E, and K. So does I can apply that using your advices into this thread? if so, how we can handle this without using user fortran into CFX solver?

Thanks in advance

singer1812 April 6, 2012 09:11

You are trying to get d/dx not d/dt?

You dont need this method (update loop) to do that, that data is in already in solution.

happy April 8, 2012 18:51

yes as you said
 
Quote:

Originally Posted by singer1812 (Post 353441)
You are trying to get d/dx not d/dt?

yes, I need d/dx and not d/dt so which way I should follow, plz?
Regards

happy April 9, 2012 00:13

misunderstand me
 
Quote:

Originally Posted by singer1812 (Post 353441)
You dont need this method (update loop) to do that, that data is in already in solution.

Hi again
Actually U misunderstand me because you talked about d /dx,y,z into post stage but what I'm looking for is set d../dx, d../dy &d../dz=0 at the boundary consitions (outlets) into set up stage.
any input can help:confused:
Regards

singer1812 April 9, 2012 08:57

Dont need transloop. Just setup a CEL expression for the derivative and put it into the BC under flow direction.

singer1812 April 9, 2012 09:02

Ahh, I didnt read your message carefully enough. You need it on the outlet.

To what purpose are you forcing the derivatives on the outlet?

happy April 9, 2012 21:10

my model
 
Quote:

Originally Posted by singer1812 (Post 353773)
Ahh, I didnt read your message carefully enough. You need it on the outlet.

To what purpose are you forcing the derivatives on the outlet?

I would like to represent the forced plume that its source elevated on the ground into large surroundinf fluid domain. I tried using many BCs but I found 3 journal article used Neumann conditions at the top domain. Actually all the 3 articles did not use ready software solver like CFX or Fluin but they had used their own code. So I want to apply neumann condition for my problem and does not matter if the boundary is outlet or openning. so is this possible through CFX.
Any input can help.

regards

happy April 9, 2012 21:17

how I input my neumann BC through flow dirrection
 
Quote:

Originally Posted by singer1812 (Post 353772)
Dont need transloop. Just setup a CEL expression for the derivative and put it into the BC under flow direction.

the flow direction is available only with opening boundary condition. However, whan I choose the cartesian components that means provide distance (m) and not dv/dx (s^-1). Is it correct:cool:?
Regards

singer1812 April 10, 2012 09:50

I dont understand why you are trying to force an outlet to have a certain gradient. Is this purely to match something in liturature?

The opening will only apply those conditions to the flow coming into the domain, not the flow leaving it. The conditions of the flow leaving the domain are a function of what takes place inside.

If you need the gradient to be zero wrt the boundary, use a symmetry BC. If it is non zero, I think you will need to use User Fortran to enforce that.

happy April 11, 2012 22:20

Quote:

Originally Posted by singer1812 (Post 353980)
I dont understand why you are trying to force an outlet to have a certain gradient. Is this purely to match something in liturature?

The opening will only apply those conditions to the flow coming into the domain, not the flow leaving it. The conditions of the flow leaving the domain are a function of what takes place inside.

If you need the gradient to be zero wrt the boundary, use a symmetry BC. If it is non zero, I think you will need to use User Fortran to enforce that.

Thanks singer1812 for your input
If I required any further recomments I will reask you:D

lihui54312 April 12, 2012 04:19

Quote:

Originally Posted by singer1812 (Post 302495)
You are getting it from a fortran routine that you are calling while CFX is running (User Fortran?)

Or are you getting it from a pre-ran fortran routine, and delta_velocity is already set for the CFX run.

This method is right, frist you must run the fortan in your computer.

anon_f July 14, 2014 18:06

TRANS_LOOP operations
 
Hello,

I am tring to use the TRANS_LOOP operation to solve the following equation in a CFX Domain:
XX=1-(1/((1-XXold)^-a+B*exp(-C/(D*T[K]))*F*n))^a

I am doing the following steps:

· Create an additional variable XX which is defined by the expression :
XX value: 1-(1/((1-XXold)^-a+B*exp(-C/(D*T[K]))*F*n))^a The variable is function of temperature.

· Create another additional variable XXold which defined by the expression:
XXold value: ave(XXold)@domain+XX()@domain*Time Step Size.

· Initially, I run a simulation with initial values in Additional Variable Models XX=0 and XXold=0. But when I set for each variable its CEL expression I am getting this following message:

"Bad expression value 'XXold val' detected in parameter 'Additional Variable Value' in object '/FLOW:Flow Analysis 1/DOMAIN:domain/SOLID MODELS/ADDITIONAL VARIABLE:XXold'.
CEL error:
The following unrecognised name was referenced: XX."


Is there anyone who can help me to overcome this problem please?

Thank you in advance for your advices and suggestions

anon_f July 15, 2014 08:37

Hello,

I am tring to use the TRANS_LOOP operation to solve the following equation in a CFX Domain:
XX=1-(1/((1-XXold)^-a+B*exp(-C/(D*T[K]))*F*n))^a

I am doing the following steps:

· Create an additional variable XX which is defined by the expression :
XX value: 1-(1/((1-XXold)^-a+B*exp(-C/(D*T[K]))*F*n))^a The variable is function of temperature.

· Create another additional variable XXold which defined by the expression:
XXold value: ave(XXold)@domain+XX()@domain*Time Step Size.
LIBRARY:
&replace ADDITIONAL VARIABLE: XXold
Option = Definition
Tensor Type = SCALAR
Units = [ ]
Update Loop = TRANS_LOOP
Variable Type = Specific
END
END
· Initially, I run a simulation with initial values in Additional Variable Models XX=0 and XXold=0. But when I set for each variable its CEL expression I am getting this following message:

"Bad expression value 'XXold val' detected in parameter 'Additional Variable Value' in object '/FLOW:Flow Analysis 1/DOMAIN:domain/SOLID MODELS/ADDITIONAL VARIABLE:XXold'.
CEL error:
The following unrecognised name was referenced: XX."


Is there anyone who can help me to overcome this problem please?

Thank you in advance for your advices and suggestions

Hemo July 15, 2014 17:48

Hi emotep, I could be wrong, but on first glance, you have ave(XXold) and XX().

I think the issue amy be here.......

anon_f July 15, 2014 21:17

what do you suggest me. I am not using a variable such MASSFLOW or velocity for the variable I want to calculate. It is in fact independent. To calculate this I have already set an additional variable and express a CEL.
Thank you for your answer

cfdonlineuser July 16, 2014 23:31

this is covered here: http://www.edr.no/blogg/ansys_blogge...rations_in_cfx


All times are GMT -4. The time now is 08:02.