CFD Online URL
[Sponsors]
Home > Forums > OpenFOAM

A beginner question

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Display Modes
Old   June 2, 2010, 19:33
Wink A beginner question
  #1
New Member
 
tom
Join Date: Jun 2010
Posts: 1
Rep Power: 0
walk_and_see is on a distinguished road
Hello all,

I am a CFD person but have no experince with OPENFOAM at all. Could you please let me know the following?

1) How long it takes to learn and be able to run a simple flow problem (e.g., flow past cylinder), including mesh making?
2) Can I use a Fortran code to call OPENFOAM?

Your input is greatly appreciated.

Go and see
walk_and_see is offline   Reply With Quote

Old   June 3, 2010, 10:11
Default
  #2
Senior Member
 
Alberto Passalacqua
Join Date: Mar 2009
Location: Ames, Iowa, United States
Posts: 1,890
Rep Power: 25
alberto will become famous soon enoughalberto will become famous soon enough
Quote:
Originally Posted by walk_and_see View Post
Hello all,

I am a CFD person but have no experince with OPENFOAM at all. Could you please let me know the following?

1) How long it takes to learn and be able to run a simple flow problem (e.g., flow past cylinder), including mesh making?
Not very long if you have some experience with codes (not commercial black boxes), and with the UNIX/Linux environment.

The story changes if you have to change the code, and at that point I would recommend to either take a course from OpenFOAM developers or be prepared to spend a good amount of time exploring and learning the code details.

Quote:
2) Can I use a Fortran code to call OPENFOAM?
If you mean call the executable, yes, nothing different from any other executable. If you mean calling OF functions from a fortran code, I would say it's not impossible but it might be hard.

Best,
__________________
Alberto

GeekoCFD - A free distribution based on openSUSE 64 bit with CFD tools, including OpenFOAM. Available as live DVD/USB, hard drive image and virtual image.
GeekoCFD 32bit - The 32bit edition of GeekoCFD.
GeekoCFD text mode - A smaller version of GeekoCFD, text-mode only, with only OpenFOAM. Available in a variety of virtual formats.
alberto is offline   Reply With Quote

Old   March 7, 2011, 15:20
Default
  #3
New Member
 
Evren
Join Date: Mar 2010
Posts: 20
Rep Power: 6
pbe_cfd is on a distinguished road
Quote:
Originally Posted by alberto View Post
If you mean call the executable, yes, nothing different from any other executable. If you mean calling OF functions from a fortran code, I would say it's not impossible but it might be hard.

Best,
Hi Alberto,

I mean to call executables, this post is from me to thread " How to interface a Fortran thermodynamic tool with OpenFOAM?"
__________________________________________________ _______
Hi,

I have couple of fortran.90 subroutines which I would like to call from OpenFOAM1.6. What I know direct call of fortran subroutine from c++ is not good. Thus, one has to have C interface to routines and some more technical difficulties as, fortran stores rowwise C stores columnwise Whatever, these are general problems of C++ and Fortran mixing. My questions are more OpenFOAM specific:

1) What should be the compiled fortran source codes, dynamic library, shared objects (.so), objects (.o) ... ? If more than one is good, which one performs better?

2) How should be this "executables" (compiled files) linked to OpenFOAM, let's say scalarFoam? How should the <file> and <options> in Make folder be modified?

Please no suggestion like "why don't you rewrite your subroutines in C++" ;-)

All the best,

@ Cyp: You see, I am chasing you ;-)
__________________________________________________ _______
Any idea?

Cheers,


pbe_cfd is offline   Reply With Quote

Old   March 8, 2011, 04:58
Default
  #4
Senior Member
 
Gijsbert Wierink
Join Date: Mar 2009
Posts: 382
Rep Power: 8
gwierink is on a distinguished road
Hi Evren,

You can call Fortran routines from within C++ code using the extern directive. There are some general hints here, here, and here. Also, check this and this OF related threads.
__________________
Regards, Gijs
gwierink is offline   Reply With Quote

Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Beginner Question me.ouda FLOW-3D 2 May 3, 2010 18:47
Beginner question :(. Turning on and off zones? Cjlaumans FLUENT 6 September 2, 2009 16:44
LES beginner question Shuo Main CFD Forum 4 July 9, 2007 09:40
Question from a beginner Arun K Main CFD Forum 4 August 13, 2004 08:17
Beginner question mesh generation. Oleg Melnik CD-adapco 2 February 26, 2001 03:39


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