CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   CFX (https://www.cfd-online.com/Forums/cfx/)
-   -   want to simulate water flow in cycles with ECL Expression! (https://www.cfd-online.com/Forums/cfx/135466-want-simulate-water-flow-cycles-ecl-expression.html)

warmboy24 May 14, 2014 00:15

want to simulate water flow in cycles with ECL Expression!
 
Hi everyone! I am using CFX-Pre to simulated heat transfer in plastic injection molds. I simulate water flow in a cycle with the Expression function in CFX-Pre as follows:

http://i1177.photobucket.com/albums/...4_10-10-31.png

Now, I want to want to simulate water flow in cycles but I can not. I do not know how.

Anyone can help me?! please!! thank you very much!

ghorrocks May 14, 2014 06:42

The expressions Temp30 and Temp80 are completely unnecessary. You just need a single simple function:

Tinlet = if(t>20[s],30[C],80[C])

This should return the same value as your function does (except at t=20[s]).

What do you mean by a cycle? The function you describe is just a change in inlet from 30C to 80C.

warmboy24 May 14, 2014 20:01

Quote:

Originally Posted by ghorrocks (Post 491732)
The expressions Temp30 and Temp80 are completely unnecessary. You just need a single simple function:

Tinlet = if(t>20[s],30[C],80[C])

This should return the same value as your function does (except at t=20[s]).

What do you mean by a cycle? The function you describe is just a change in inlet from 30C to 80C.

Thank you!
My cycle is 40 seconds, in the first twenty seconds the temperature is 80 ° C, in the next twenty seconds the temperature is 30oC. I now want to change the temperature in several consecutive cycles. For example, in two cycles, from 1s to 20s temperature is 80oC, from 20s to 40s temperature is 30oC, from 40s to 60s returned to 80oC temperature, from 60s to 80s temperature is 30oC.

Now I want to simulate many cycles (eg 100 cycles), but I do not know how. Can I change the settings in CFX-Pre to do that? or I have to create an Expression to do it?

ghorrocks May 14, 2014 20:11

Easy:

CyclePosition = mod(t,40[s])
Tinlet = if(CyclePosition<20[s],80[C],30[C])

warmboy24 May 14, 2014 20:52

Quote:

Originally Posted by ghorrocks (Post 491898)
Easy:

CyclePosition = mod(t,40[s])
Tinlet = if(CyclePosition<20[s],80[C],30[C])

Its Working! Thank You very much! :)

warmboy24 June 3, 2014 10:12

Quote:

Originally Posted by ghorrocks (Post 491898)
Easy:

CyclePosition = mod(t,40[s])
Tinlet = if(CyclePosition<20[s],80[C],30[C])

Hello Ghorrocks! Can you help me again?!


I'm making a simulated blow hot air on the surface of an object, as shown below.

http://i1177.photobucket.com/albums/...3_20-28-20.png

Now, I want to control airflow over time and in multiple cycles. in one cycle (40 s): in the first 5 seconds of hot air is blown into; in the next 35 seconds not blow.

For example, I simulated in two consecutive cycles. from 0s to 5s air is blown into; from 5s to 40s not blow; from 40s to 45s air is blown into; from 45s to 80s not blow.

Can I control it by Experssion? and how do I do that?

Thanks!

mvoss June 5, 2014 05:48

use the if()-statement to control the temperature. since itīs not directly related to the massflow you can simply turn it on and off when there is no flow.
If there are not to many cycles... create an expression for every "peak" with the return values being "0" otherwise and in the end add up all the peakes like T_inlet=T1+T2+T3+T4... and use T_inlet @ inlet

warmboy24 June 6, 2014 09:29

Quote:

Originally Posted by mvoss (Post 495671)
use the if()-statement to control the temperature. since itīs not directly related to the massflow you can simply turn it on and off when there is no flow.
If there are not to many cycles... create an expression for every "peak" with the return values being "0" otherwise and in the end add up all the peakes like T_inlet=T1+T2+T3+T4... and use T_inlet @ inlet

I used this Expressions to controll massflow and It ran look well. But Im not really sure. What do you think about that?!

http://i1177.photobucket.com/albums/...Untitled-1.png

In 20s cycle.

ghorrocks June 10, 2014 07:42

Your function is fine. It turns the flow on for 5s and off for 15s, and repeats this forever. I do not know why you would bother with lots of if statements when the function you have is simple, nice and will continue if you decide you need to run for more cycles.


All times are GMT -4. The time now is 23:19.