|September 16, 2011, 09:42||
Function with parameters
Join Date: Aug 2011
Posts: 10Rep Power: 7
I'm trying to simulate a multicomponent gas flow.
The gas has more than 20 different components, each one with different properties.
The heat capacity of each component follows the following law:
Cp(a,b,c,d,e,T) = a*T +b*(T^2)+c*(T^-1) +d*(e)
Where a,b,c,d and e are parameters which differ from component to component and T is the gas temperature.
I'd like to know if there's a way within CFX for me to write this function Cp(a,b,c,d,e,T) and call it within the materials properties.
This way, when I'm setting each components properties I don't need to write the whole expression, just call the Cp(a,b,c,d,e,T) with the appropriate parameters a,b,c,d and e.
thanks a lot
|September 17, 2011, 07:09||
Join Date: Mar 2009
Location: Sydney, Australia
Posts: 13,301Rep Power: 103
You cannot do CEL functions like this. You can write a fortran subroutine to do it. But I would just write it all out in CEL. Using a text editor it should not be too hard to knock up the CEL expressions for each of the 20 components.
I realise this is not "elegant" and a computer scientist would choke on his weeties, but it should work, is straightforward and will get the job done.
|cel, expression, function|
|Thread||Thread Starter||Forum||Replies||Last Post|
|Compile problem||ivanyao||OpenFOAM Running, Solving & CFD||1||October 12, 2012 09:31|
|ParaView for OF-1.6-ext||Chrisi1984||OpenFOAM Installation||0||December 31, 2010 07:42|
|latest OpenFOAM-1.6.x from git failed to compile||phsieh2005||OpenFOAM Bugs||25||February 9, 2010 05:37|
|Error with Wmake||skabilan||OpenFOAM Installation||3||July 28, 2009 00:35|
|Axisymmetrical mesh||Rasmus Gjesing (Gjesing)||OpenFOAM Native Meshers: blockMesh||10||April 2, 2007 14:00|