Q: How can I use the CEL in CFX 10.0 to specify the
value of a parameter over a range; e.g. different temperatures for
different values of "xGlobal":
T = 10 [C] for xGlobal = 0 [m] to xGlobal = 1 [m]
T = 50 [C] for xGlobal = 1 [m] to xGlobal = 2 [m]
T = 55 [C] for xGlobal = 2 [m] to xGlobal = 3 [m]
...and so on...
A) You should use the step function for this.
The step function works as follows:
Step(x)=1, if x>0
Step(x)=0.5, if x=0
Step(x)=0, if x<0
Therefore, to write the below you would need:
xbar=x/1.0 [m]
T1=10 [K]
T2=50 [K]
T3=55 [K]
T = T1*step(1-xbar)+T2*step(2-xbar)*(step(xbar-1)+ T3*step(3-xbar)*(step(xbar-2).
Q: How can I use the CEL in CFX 10.0 to specify the value of a parameter over a range; e.g. different temperatures for different values of "xGlobal": T = 10 [C] for xGlobal = 0 [m] to xGlobal = 1 [m] T = 50 [C] for xGlobal = 1 [m] to xGlobal = 2 [m] T = 55 [C] for xGlobal = 2 [m] to xGlobal = 3 [m] ...and so on... A) You should use the step function for this. The step function works as follows: Step(x)=1, if x>0 Step(x)=0.5, if x=0 Step(x)=0, if x<0 Therefore, to write the below you would need: xbar=x/1.0 [m] T1=10 [K] T2=50 [K] T3=55 [K] T = T1*step(1-xbar)+T2*step(2-xbar)*(step(xbar-1)+ T3*step(3-xbar)*(step(xbar-2). |
||
|