Can CEL read a C-Program
Hi Guys,
I am trying to write a expression for a transient study. The temperature of the body increases 10[c] for every 10[s] till it reaches a temperature of some 120[c]. (llike a step to the top). so can CEL read a c-program that contains i++, for, if ,else...etc? Thankyou Best Regards |
No, CEL cannot read a C++ file.
You can write a fortran file which can return values you can refer to as a CEL variable. But the function you describe can be written directly in CEL. No need for fortran or C++ for a simple function like that. |
Thankyou for replying
I am kind of new to writing CEL expressions.. so i wanted to try something which i knew. can you recommend me some link or study material so that i can learn how to write this step function in CEL. Thankyou in Advance |
Have a look at the CFX tutorial examples and the reference manual.
|
Thankyou Glenn
|
I have written this expression for the above said problem
step((t-10[s])/1[s])*10[c]+ step((t-20[s])/1[s])*10[c]+ .... + step((t-120[s])/1[s])*10[c] Is there any way i can reduce the size of the expression ? Thankyou in Advance |
The if() statement can simplify some expressions. The mod() function is good for repeating functions. You can also use 1D interpolation functions as well.
|
All times are GMT -4. The time now is 14:32. |