|
[Sponsors] |
December 11, 2015, 06:06 |
Can CEL read a C-Program
|
#1 |
New Member
Join Date: Oct 2015
Posts: 17
Rep Power: 11 |
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 |
|
December 11, 2015, 07:42 |
|
#2 |
Super Moderator
Glenn Horrocks
Join Date: Mar 2009
Location: Sydney, Australia
Posts: 17,852
Rep Power: 144 |
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. |
|
December 11, 2015, 09:34 |
|
#3 |
New Member
Join Date: Oct 2015
Posts: 17
Rep Power: 11 |
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 |
|
December 11, 2015, 18:38 |
|
#4 |
Super Moderator
Glenn Horrocks
Join Date: Mar 2009
Location: Sydney, Australia
Posts: 17,852
Rep Power: 144 |
Have a look at the CFX tutorial examples and the reference manual.
|
|
December 12, 2015, 06:48 |
|
#5 |
New Member
Join Date: Oct 2015
Posts: 17
Rep Power: 11 |
Thankyou Glenn
|
|
December 18, 2015, 02:49 |
|
#6 |
New Member
Join Date: Oct 2015
Posts: 17
Rep Power: 11 |
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 |
|
December 18, 2015, 06:30 |
|
#7 |
Super Moderator
Glenn Horrocks
Join Date: Mar 2009
Location: Sydney, Australia
Posts: 17,852
Rep Power: 144 |
The if() statement can simplify some expressions. The mod() function is good for repeating functions. You can also use 1D interpolation functions as well.
|
|
Tags |
c-program, cel, transient |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
how to calculate mass flow rate on patches and summation of that during the run? | immortality | OpenFOAM Post-Processing | 104 | February 16, 2021 09:46 |
Read Mesh | peterwy | OpenFOAM Programming & Development | 0 | April 15, 2010 06:14 |
Update boundary conditions calculated by an external program | CedricVH | OpenFOAM | 2 | January 15, 2010 12:55 |
problem when converting mesh (made by ICEM) using fluentMeshToFoam | Forrest_Lei | OpenFOAM | 11 | October 16, 2009 07:28 |
Error Fluents | TDL | FLUENT | 6 | April 26, 2005 07:02 |