CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   FLUENT (https://www.cfd-online.com/Forums/fluent/)
-   -   how to launch fluent from C code (https://www.cfd-online.com/Forums/fluent/44682-how-launch-fluent-c-code.html)

Hugo May 12, 2007 12:42

how to launch fluent from C code
 
Hi Users,

I want to launch fluent from a C program that I am writing, but teh C compiler does not understand

fluent 2d -i journal.jou

What headers do I need to include to let me do it? Have I missed anything else?

Cheers, Hugo.

zyno May 12, 2007 19:31

Re: how to launch fluent from C code
 
the simplest idea would be to use system command from C code. but it might give you troubles, assuming that your code wants to wait till calculations finish. So if you are in unix, use expect from C code to launch fluent (this i have never done but i know this should be done). Explore the expect manuals and you will know more.

Sachin Goel May 23, 2007 17:11

Re: how to launch fluent from C code
 
I don't think that it can be called like that. If you want to call fluent from c program you try to call it from system command after including stdlib.h header file. ex. system("fluent 2d -i journal.jou");

but before that make sure that fluent can be called from any directory by adding path of fluent bin directory in path environment variable.


All times are GMT -4. The time now is 06:23.