New Boundary Condition
Hi there!
i am new in this one and i would like to post some questions about adding a new boundary condition in OpenFOAM 2.1.x. I have read about the boundary condition "fixedMeanValue" which one i would like to use as an alternative boundary condition for the pressure outlet in 0/p. I refer to an older posting about this topic, which one i found here: http://www.cfd-online.com/Forums/ope...condition.html My problem is that i am new into developing applications for OpenFOAM, that's why i have some problems implementing the "fixedMeanValue" boundary condition. Here are the steps that i performed: 1. download the .H and .C files for the "fixedMeanValue" bc from here: http://openfoam-extend.svn.sourcefor...ixedMeanValue/ 2. i created a new folder named "fixedMeanValue" including the downloaded .H and .C files in: ~/OpenFOAM/OpenFOAM-2.1.x/src/finiteVolume/fields/fvPatchFields/derived 3. i added some lines in Make (the path is: ~/OpenFOAM/OpenFOAM-2.1.x/src/finiteVolume/Make: 3.1 .../src/finiteVolume/Make/files: $(derivedFvPatchFields)/fixedMeanValue/fixedMeanValueFvPatchFields.C (i added these line below the entry: $(derivedFvPatchFields)/waveSurfacePressure/waveSurfacePressureFvPatchScalarField.C) 3.2 .../src/finiteVolume/Make/files: LIB = $(FOAM_USER_LIBBIN)/libfixedMeanValue (i added these line at the end of the .../Make/files) 3.3 .../src/finiteVolume/Make/options: EXE_INC = \ -I$(LIB_SRC)/triSurface/lnInclude \ -I$(LIB_SRC)/meshTools/lnInclude -I$(LIB_SRC)/finiteVolume/lnInclude LIB_LIBS = \ -lOpenFOAM \ -ltriSurface \ -lmeshTools -lfiniteVolume 4. i added the following line to my controlDict file: libs ("libfixedMeanValue.so") 5. trying to recompile using following steps in ~/OpenFOAM/OpenFOAM-2.1.x/src/finiteVolume: 5.1 wclean 5.2 wmake libso I am constantinously getting the error message: "wmake error: file 'Make/linux64Gcc46DOpt/objectFiles' could not be created in ~/OpenFOAM/OpenFOAM-2.1.x/src/finiteVolume" I have already tried to run ./Allwmake in ~/.../OpenFOAM-2.1.x/src but i always receive the error message "...could not load libfixedMeanValue.so" when i run my testcase. Maybe i have to recompile the entire OpenFOAM-folder?? Hopefully somebody could help me in this one, giving me some kind of support or maybe a detailed step by step manual. Please help me! sincerely kimotbwb |
I do not know by how far that causes your problem, but have you already tried with doing these things in the folder which is dedicated to the user?
Usually there should be a directory ~OpenFOAM/username-2.1.x/run/ . I usually have a directory for my own BCs in there which works fine with the same procedure you described. Maybe the "USER" part for the compilation goal requires the directories to be outside of the original OpenFOAM-structure and within the directory which is set for the USER by standard linking within OpenFOAM? As I said: Just a guess, but maybe it helps... |
you are missing some \ at the end of the included directories in your Make/options file.
You have: EXE_INC = \ -I$(LIB_SRC)/triSurface/lnInclude \ -I$(LIB_SRC)/meshTools/lnInclude -I$(LIB_SRC)/finiteVolume/lnInclude LIB_LIBS = \ -lOpenFOAM \ -ltriSurface \ -lmeshTools -lfiniteVolume Should be EXE_INC = \ -I$(LIB_SRC)/triSurface/lnInclude \ -I$(LIB_SRC)/meshTools/lnInclude \ -I$(LIB_SRC)/finiteVolume/lnInclude \ LIB_LIBS = \ -lOpenFOAM \ -ltriSurface \ -lmeshTools \ -lfiniteVolume \ |
1 Attachment(s)
Hi all,
I have my user defined boundary conditions compiled in a directory 'myWork' in user2.2.2/run directory. I have modified a solver (buoyantFoam) and have it in my user2.2.2/applications/solvers directory. When I try and run the case with the 'new BC' I get an error similar to what Code:
--> FOAM FATAL IO ERROR: I've attached the options file in my run/myWork/Make directory Thanks, |
If you compiled the boundary condition into a library, you can include it in system/controlDict using libs("myLib.so") to access it from the solver.
|
Dear Bernhard,
I had already included the library having this boundary condition in the controlDict file (along with "libOpenFOAM.so"). But I still get the error. |
All times are GMT -4. The time now is 04:37. |