CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   CFX (https://www.cfd-online.com/Forums/cfx/)
-   -   How to write Expression for Transient study (https://www.cfd-online.com/Forums/cfx/163543-how-write-expression-transient-study.html)

AK5 December 1, 2015 01:02

How to write Expression for Transient study
 
Hi guys,
I want to know how to write expression for a body whose temperature will vary from 0 C at 0 sec to 120 C at 10e-6 sec and remains constant at 120 C till 1 sec.

Best Regards:)

Thankyou In Advance

tomson199 December 1, 2015 03:32

If your simulation will be last 1 sec, the formula is:

if(t<=10e-6 [s], 0 [C], 120 [C])

AK5 December 1, 2015 04:26

Thanks for the reply
I make this as an expression and put this expression in the body, will the temperature remain constant at 120C after 10e-6 sec up to say 1,2..10sec.

Thankyou In Advance

tomson199 December 1, 2015 04:46

You would like drop temperature to 0 C after 1 sec?

AK5 December 1, 2015 06:48

thanks for your reply

at 0 sec it should be 0 C
then at 10e-6 it should be 120 C
and after that the temperature should remain constant at 120 C till 10 sec

i tried to put the above equation in an expression (t<=10e-6 [s], 0 [C], 120 [C]). It is showing error.

Thankyou in Advance

Lance December 1, 2015 07:51

CEL is pretty powerful and you should spend some time learning the syntax. Here's probably what you want:
if(t<10e-6[s],mod(t,10e-6[s])/10e-6[s]*120[C],120[C])
(It will remain at 120 [C] after 10e-5 seconds)
But be aware that the mod function is a bit buggy when using decimal numbers.

AK5 December 1, 2015 07:58

Thanks for the reply

Can you recommend something i want learn this CEL, so that i can write more complex equations.

thankyou so much

Lance December 1, 2015 08:22

The manual is a good start... There are some CEL examples in the tutorials too.

AK5 December 1, 2015 09:21

Thankyou
I'll see what i can find about the manual in the internet and get back to you..

brunoc December 2, 2015 14:14

You can't directly fix the temperature of a domain in CFX. What you can do instead is use a big enough energy sink/source so that the temperature in each control volume remains really close to your intended temperature. Something like:

C (T_{ref} - T)

where C is the big enough constant [W/(m^3 K)] and T_{ref} the temperature you want.


All times are GMT -4. The time now is 13:59.