|
[Sponsors] |
March 5, 2008, 09:29 |
Hello to FOAMing user,
I am w
|
#1 |
New Member
David Sponiar
Join Date: Mar 2009
Location: Prague, Czech rep.
Posts: 27
Rep Power: 17 |
Hello to FOAMing user,
I am working very hard on to implement new BC. My situation is quite strange: While I am compiling new BC I follow this 3 basic steps: ____________ compile new BC, which create new library compile foamUser, which called new BC's library compile little bit modified simpleFoam, which called updated foamUser's library ____________ Every steps are finished successfuly, it means: new dynamic library are update and modified simpleFoam is compiled without any errors. When I run application simpleFoam with case, where is new BC defined on outlet, FOAM FATAL ERROR says to me: "Unknown patchField type modifiedOutlet for patch type patch" The strange thing is to me, when I follow same compiling steps on another PC (notebook with OpenSuSE 10.3.) with same source codes, I can successfuly hook new BC. I was looking for any mistake for two days. I did not find anything weird. So I packed whole OpenFOAM directory on notebook and copy and unpacked on worskation with SuSE Linux Enterprise Desktop 10.0. foamInstalationTest is after that OK. Every is OK, but after 3 compiling steps, new BC is unknown. Give me please any hint, where could be any mistake. Thans a lot. David I attach list of Make/files and Make/options from new BC, foamuser and modified simpleFoam: __________________________ new BC Make/files modifiedOutlet.C LIB = $(FOAM_LIBBIN)/libNewBC new BC Make/options EXE_INC = \ -I$(LIB_SRC)/finiteVolume/lnInclude LIB_LIBS = \ -lfiniteVolume __________________________ foamUser Make/files libfoamUser.C LIB = $(FOAM_USER_LIBBIN)/libfoamUser foamUser Make/options LIB_LIBS = \ -lNewBC __________________________ simpleFaom Make/files simpleFoamModified.C EXE = $(FOAM_USER_APPBIN)/simpleFoamModified simpleFaom Make/options EXE_INC = \ -I$(LIB_SRC)/finiteVolume/lnInclude \ -I$(LIB_SRC)/turbulenceModels \ -I$(LIB_SRC)/transportModels \ -I$(FOAM_USER_LIBBIN) EXE_LIBS = \ -lincompressibleTurbulenceModels \ -lincompressibleTransportModels \ -lfiniteVolume \ -lmeshTools LIB_LIBS = \ -lfoamUser |
|
March 5, 2008, 14:55 |
David,
to answer your quest
|
#2 |
Senior Member
Kārlis Repsons
Join Date: Mar 2009
Location: Latvia
Posts: 111
Rep Power: 17 |
David,
to answer your question it is necessary that you post in relevant BCs in /0/{U,p,...} and beginning of BC class definition (if you didn't wrote it from scratch, that is - if you modified some OF's class)! Kārlis |
|
March 6, 2008, 18:21 |
David,
some ideas for you:
|
#3 |
Senior Member
Kārlis Repsons
Join Date: Mar 2009
Location: Latvia
Posts: 111
Rep Power: 17 |
David,
some ideas for you: * what happens if you compile your BCs in solver? (I agree it's better to make a libraries, but maybe you can try that - just add *.C files to Make/files) * be sure to access solver variables in a right way (take a look at buoyantFoam's BCs, parabolic U inlet etc) * Its not likely to be the case for problem you stated, but it's not a very good idea to use in code things you don't know about. Kārlis |
|
March 6, 2008, 20:00 |
Hello Kārlis,
It's kind of y
|
#4 |
New Member
David Sponiar
Join Date: Mar 2009
Location: Prague, Czech rep.
Posts: 27
Rep Power: 17 |
Hello Kārlis,
It's kind of you, that you are responding to my problem with implementing new BC. I'll promise to share my progres in "fighting with my implementation new BC and self-conquest". >> what happens if you compile your BCs in solver? When I compile modified simpleFoam with calling dynamic library (noticed above), every goes right way = compiling is successful and new application simpleFoamModified is created. But hookin new BC type in boundary file /0/q is not successful. >> be sure to access solver variables in a right way (take a look at buoyantFoam's BCs, parabolic U inlet etc) Actualy, I copy source code of totalPressure BC, just rename everything in code to modifiedOutletFvPatchScalarField and added new operator with evaluating mathematical operations with normal gradients. (Of course with regards to corect programing standard in C++ and OpenFOAM philosophy). Strange thing is to me, that same code in same OpenFOAM, but on another PC was compilied and implemented succesfull. I'll check my steps and share my more or less satisfactory progres. David |
|
March 7, 2008, 07:31 |
The easiest way of exposing ex
|
#5 |
Senior Member
Eugene de Villiers
Join Date: Mar 2009
Posts: 725
Rep Power: 21 |
The easiest way of exposing existing solvers and utilities to new boundary conditions is to add an entry like this to your controlDict:
libs ("<path>/<library>"); Much easier than recompiling and copying stuff around. |
|
March 7, 2008, 09:05 |
Hello foaming users,
I find t
|
#6 |
New Member
David Sponiar
Join Date: Mar 2009
Location: Prague, Czech rep.
Posts: 27
Rep Power: 17 |
Hello foaming users,
I find the right way: After lot of testing combination, I added this line: libs ("libfinite.so"); to /system/controlDict and simpleFoam goes smoothly without any FOAM FATAL ERROR. That's the way! David |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Successful Installation My report | quartzian | OpenFOAM Installation | 2 | April 30, 2009 04:59 |
Successful PhD | grtabor | OpenFOAM Running, Solving & CFD | 2 | February 24, 2009 05:08 |
Problem FoamXHostBrowser not found after successful compilation | david_flo1 | OpenFOAM | 0 | January 21, 2008 23:04 |
UDF Hooking | Bhaskar Roy | FLUENT | 1 | April 20, 2006 02:50 |
Hooking Problem | bowling | FLUENT | 0 | April 30, 2004 05:38 |