|
[Sponsors] |
June 20, 2012, 07:28 |
New Boundary Condition
|
#1 |
New Member
Join Date: Jun 2012
Posts: 12
Rep Power: 14 |
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 |
|
June 20, 2012, 07:53 |
|
#2 |
Senior Member
|
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... |
|
February 18, 2013, 07:44 |
|
#3 |
Member
Join Date: Oct 2011
Posts: 37
Rep Power: 15 |
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 \ |
|
November 8, 2013, 07:57 |
|
#4 |
Senior Member
Srivathsan N
Join Date: Jan 2013
Location: India
Posts: 101
Rep Power: 13 |
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: Unknown patchField type newDirectionMixed for patch type patch Valid patchField types are : 68 ( SRFFreestreamVelocity SRFVelocity activeBaffleVelocity activePressureForceBaffleVelocity advective atmBoundaryLayerInletVelocity calculated codedFixedValue codedMixed cyclic cyclicAMI cyclicSlip cylindricalInletVelocity directionMixed empty externalCoupled fixedGradient fixedInternalValue fixedJump fixedJumpAMI fixedMean fixedNormalSlip fixedValue flowRateInletVelocity fluxCorrectedVelocity freestream inletOutlet kqRWallFunction mapped mappedField mappedFixedInternalValue mappedFixedPushedInternalValue mappedFlowRate mappedVelocityFlux mixed movingWallVelocity nonuniformTransformCyclic oscillatingFixedValue outletInlet outletMappedUniformInlet partialSlip pressureDirectedInletOutletVelocity pressureDirectedInletVelocity pressureInletOutletParSlipVelocity pressureInletOutletVelocity pressureInletUniformVelocity pressureInletVelocity pressureNormalInletOutletVelocity processor processorCyclic rotatingPressureInletOutletVelocity rotatingWallVelocity sliced slip supersonicFreestream surfaceNormalFixedValue swirlFlowRateInletVelocity symmetryPlane timeVaryingMappedFixedValue translatingWallVelocity turbulentInlet uniformFixedValue uniformJump uniformJumpAMI variableHeightFlowRateInletVelocity waveTransmissive wedge zeroGradient ) file: /home/srivathsan/OpenFOAM/srivathsan-2.2.2/run/liquidBridge/0/U.boundaryField.freeSurface from line 25 to line 26. From function fvPatchField<Type>::New(const fvPatch&, const DimensionedField<Type, volMesh>&, const dictionary&) in file /home/opencfd/OpenFOAM/OpenFOAM-2.2.2/src/finiteVolume/lnInclude/fvPatchFieldNew.C at line 136. I've attached the options file in my run/myWork/Make directory Thanks,
__________________
Regards, Srivaths |
|
November 8, 2013, 09:47 |
|
#5 |
Senior Member
Bernhard
Join Date: Sep 2009
Location: Delft
Posts: 790
Rep Power: 22 |
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.
|
|
November 8, 2013, 12:44 |
|
#6 |
Senior Member
Srivathsan N
Join Date: Jan 2013
Location: India
Posts: 101
Rep Power: 13 |
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.
__________________
Regards, Srivaths |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Domain Imbalance | HMR | CFX | 5 | October 10, 2016 06:57 |
Boundary Conditions | Thomas P. Abraham | Main CFD Forum | 20 | July 7, 2013 06:05 |
Setting outlet Pressure boundary condition using CAFFA code | Mukund Pondkule | Main CFD Forum | 0 | March 16, 2011 04:23 |
How exactly the "pressure outlet" bdry condition compute properties on the boundary? | yating9901 | FLUENT | 3 | June 28, 2010 13:26 |
How to set boundary condition in Fluent for the fo | Peiyong | FLUENT | 1 | November 10, 2006 12:44 |