|
[Sponsors] |
October 19, 2009, 16:25 |
Export a C code
|
#1 |
New Member
Vitor Braga
Join Date: Oct 2009
Posts: 28
Rep Power: 16 |
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 |
|
October 20, 2009, 03:10 |
|
#2 | |
Senior Member
Mark Olesen
Join Date: Mar 2009
Location: https://olesenm.github.io/
Posts: 1,677
Rep Power: 40 |
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 | Search this Thread |
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 | 94 | August 25, 2015 10:45 |
export data at nodes | Meenu | FLUENT | 1 | December 30, 2011 02:24 |
Small 3-D code | Zdravko Stojanovic | Main CFD Forum | 2 | July 19, 2010 11:11 |
CFD Code with Fortran | murat | Main CFD Forum | 0 | October 11, 2009 18:05 |
Importing I-DEAS unv file | hbetb | FLUENT | 1 | August 10, 2001 14:22 |