|
[Sponsors] |
January 22, 2014, 16:07 |
How to compile a BC
|
#1 |
Member
xxxxx
Join Date: Feb 2013
Posts: 34
Rep Power: 13 |
Hello,
I'm trying to learn how to compile a BC within OF 2.1.1 . I tried to follow the instructions by openfoamwiki (http://openfoamwiki.net/index.php/Ho...dary_condition) but I'm not able to make it work. I copied all the files in opt/openfoam211/..../finiteVolume/fvPatchFields/..../fixedValue/ in a new directory. I renamed all the files adding the "my" prefix. Within all the files I replaced all the fixedValueFvPatchField occurrences with myfixedValueFvPatchField as indicated by the guide. I created the Make dir with Make/files file: myfixedValueFvPatchField.C LIB = $FOAM_USER_LIBBIN/libmyfixedValueFvPatch and Make/options file: EXE_INC =\ -I$(LIB_SRC)/finiteVolume/lnInclude LIB_LIBS =\ -lfiniteVolume 1st question: In openfoamwiki they say to :
2nd question: When I try wmake libso I get errors because "in myfixedValueFvPatch.C.....myfixedValueFvPatch<type > is not a type name... " (or something alike)at line 36 (you can refer to the fixedValue source code, since I didn't change it). Can you help me with this problem please? I will be grateful
__________________
Federico |
|
January 23, 2014, 04:55 |
|
#2 |
Senior Member
|
Hint: Here's my "files" file which works,
Code:
fvPatchFields = fields/fvPatchFields derivedFvPatchFields = $(fvPatchFields)/derived $(derivedFvPatchFields)/myMovingWallSlip/myMovingWallSlipFvPatchVectorField.C LIB = $(FOAM_USER_LIBBIN)/libmyFiniteVolume Code:
EXE_INC = \ -I$(LIB_SRC)/finiteVolume/lnInclude \ -I$(LIB_SRC)/meshTools/lnInclude \ EXEC_LIBS = -Louis |
|
January 24, 2014, 16:28 |
|
#3 |
Member
xxxxx
Join Date: Feb 2013
Posts: 34
Rep Power: 13 |
Thank you louisgag.
Actually I could compile the BC and solve the problem by myself. The point is that I used as a basis for myBC the basic/fixedValue BC. Starting from a derived BC it was simple to understand what to do and make it work. However I still have a question: consider the src/finiteVolume/fields/fvPatchFields/basic/fixedValue/fixedValueFvPatchField.H file. At lines 50 and following, you can find: template<class Type> class fixedValueFvPatchField : public fvPatchField<Type> Is it because fixedValueFvPatchField is a general type and becames a specific class only when you specify if it either refers to a scalar or a vectorial field?
__________________
Federico |
|
January 24, 2014, 18:42 |
|
#4 |
Senior Member
|
||
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
ATTN ALL: SOLUTON TO UDF COMPILE PROBLEM | Rizwan | Fluent UDF and Scheme Programming | 40 | March 18, 2018 06:05 |
How to compile OpenFOAM-1.7.x on CrunchBang linux 10 | gwierink | OpenFOAM Installation | 0 | April 5, 2011 04:38 |
PV3FoamReader compile error.... | PEM_GUY | OpenFOAM Installation | 6 | April 5, 2010 17:22 |
Error compile file udf | czfluent | Fluent UDF and Scheme Programming | 24 | September 26, 2009 13:24 |
compile the UDF | Li Jingping | FLUENT | 2 | April 14, 2003 21:18 |