|
[Sponsors] | |||||
|
|
|
#1 |
|
New Member
Vitor Braga
Join Date: Oct 2009
Posts: 28
Rep Power: 5 ![]() |
Is it possible to export a C written code to OpenFOAM?
For example, if Im looking forward to expressing a variable boundary condition (let's assume a senoid), can I write it in C and use it as an input to OpenFOAM? Like in Fluent there are the UDF's (user defined functions). Thank you, very much. Regards. Vitor Braga |
|
|
|
|
|
|
|
|
#2 | |
|
Senior Member
Mark Olesen
Join Date: Mar 2009
Location: http://olesenm.github.com/
Posts: 766
Rep Power: 16 ![]() |
Quote:
It'll depend on what type of bc you have (fixed, gradient, mixed), but you could take one of the timeVaryingXXX boundary conditions from OpenFOAM as a starting point and define your things as 'extern C' binding (presuming they are in an external library. The other possibility is just to compile your existing C code as C++ as part of your new OpenFOAM bc. |
||
|
|
|
||
![]() |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| how to export every data w.r.t time to txt file | jaho | CFX | 76 | September 6, 2012 06:08 |
| export data at nodes | Meenu | FLUENT | 1 | December 30, 2011 01:24 |
| Small 3-D code | Zdravko Stojanovic | Main CFD Forum | 2 | July 19, 2010 10:11 |
| CFD Code with Fortran | murat | Main CFD Forum | 0 | October 11, 2009 17:05 |
| Importing I-DEAS unv file | hbetb | FLUENT | 1 | August 10, 2001 13:22 |