|
[Sponsors] |
March 27, 2019, 14:48 |
how to set the input as a variable?
|
#1 |
Member
Join Date: Feb 2019
Posts: 30
Rep Power: 7 |
I want to use the mass flow rate as the input, but not constant. Like in the first 1 s, it is 0.03 kg/s, then 0.02 kg/s for the next 3 s, then 0.01 kg/s for the last 1 s. The total time is 5 s. Is there a simple way to do that?
(As I can image, I will connect three modules and try to set the constant mass flow rate in each like 0.03, 0.02, 0.01 kg/s. Then use the result of the last module as the initial condition of the next phase. But it may not work.) |
|
March 27, 2019, 16:03 |
|
#2 |
Senior Member
Join Date: Jun 2009
Posts: 1,880
Rep Power: 33 |
You can write an expression using "step" function
step (arg) = 0 if arg < 0, 0.5 if arg = 0, 1 arg > 0 tfac = 1 [s] massflow = Value1 * step( (t1 - t) / tfac) + Value2 * (step ((t2-t) / tfac) - step( (t1-t) / tfac) ) Recall you can plot the expression in CFX-Pre, Expressions panel. So you can try to see if the expression works as expected |
|
Tags |
input variable |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[snappyHexMesh] determining displacement for added points | CFDnewbie147 | OpenFOAM Meshing & Mesh Conversion | 1 | October 22, 2013 10:53 |
OF 1.6 | Ubuntu 9.10 (64bit) | GLIBCXX_3.4.11 not found | piprus | OpenFOAM Installation | 22 | February 25, 2010 14:43 |
Problem installing on 64bit with ver13 | jonititan | OpenFOAM Installation | 5 | May 12, 2006 19:42 |
Problem installing on 64bit with ver13 | jonititan | OpenFOAM Installation | 0 | April 28, 2006 06:45 |
Problems with installation | jonititan | OpenFOAM Installation | 4 | November 6, 2005 05:16 |