|
[Sponsors] |
April 3, 2009, 04:49 |
How could new B.C be compiled?
|
#1 |
Member
Hy Yu
Join Date: Mar 2009
Location: Hessen, Germany
Posts: 34
Rep Power: 17 |
Hi everybody,
i would like to change the standard B.C. "oscillatingFixedValue" to new one, "myOscillatingFixedValue". It can make B.C varies with two frequencies. I have copied the standard dictiondary "oscillatingFixedvalue" and renamed it to "myOscillatingFixedValue". Everyword which begins with "oscillating" in the "oscillatingFixedValue" has been renamed to "myOscillatingFixedValue", and i have added "frequency2" in "myOscillatingFixedValue" wherever "frequency" appears, in the meantime the "frequency" has been renamed to "frequency1". I have also created subdictionary "Make". At last i have tried to compile it using "wmake libso", but it didnot succeed. Can anybody tell me what should I do? Every hint and advice would be appreciated gratefully. |
|
April 3, 2009, 06:43 |
|
#2 |
Member
Ivor Clifford
Join Date: Mar 2009
Location: Switzerland
Posts: 94
Rep Power: 17 |
Hi, you're going to have to be a bit more specific on what you mean by "it did not succeed". The problem could be anything from not setting up your wmake files and options correctly to coding errors. Also note that you should have modified all 5 source code files myOscillatingFixedValueFvPatchField.C, myOscillatingFixedValueFvPatchField.H, myOscillatingFixedValueFvPatchFields.C, myOscillatingFixedValueFvPatchFields.H and myOscillatingFixedValueFvPatchFieldsFwd.H for the new boundary condition and your wmake files should reference myOscillatingFixedValueFvPatchFields.C.
|
|
April 3, 2009, 07:14 |
|
#3 |
Member
Hy Yu
Join Date: Mar 2009
Location: Hessen, Germany
Posts: 34
Rep Power: 17 |
Hi Ivor, thanks for your answer.
yes, i have modified every source files. And Make/files: myOscillatingFixedValueFvPatchField.C myOscillatingFixedValueFvPatchFields.C LIB = $(FOAM_USER_LIBBIN) /libmyBCs EXE_INC = \ -I$(LIB_SRC)/finiteVolume/lnInclude EXE_LIBS = \ After compile using "wmake libso" , the following come: ~/OpenFOAM/OpenFOAM-1.4.1/wmake/Makefile:174: Warnung: Die Befehle für das Ziel ~/OpenFOAM/hongyi-1.4.1/lib/linux64GccDPOpt« werden überschrieben ~/OpenFOAM/OpenFOAM-1.4.1/wmake/Makefile:165: Warnung: Alte Befehle für das Ziel ~/OpenFOAM/hongyi-1.4.1/lib/linux64GccDPOpt« werden ignoriert ~/OpenFOAM/OpenFOAM-1.4.1/wmake/Makefile:183: Warnung: Die Befehle für das Ziel ~/OpenFOAM/hongyi-1.4.1/lib/linux64GccDPOpt« werden überschrieben ~/OpenFOAM/OpenFOAM-1.4.1/wmake/Makefile:174: Warnung: Alte Befehle für das Ziel ~/OpenFOAM/hongyi-1.4.1/lib/linux64GccDPOpt« werden ignoriert ~/OpenFOAM/OpenFOAM-1.4.1/wmake/Makefile:191: Warnung: Die Befehle für das Ziel ~/OpenFOAM/hongyi-1.4.1/lib/linux64GccDPOpt« werden überschrieben ~/OpenFOAM/OpenFOAM-1.4.1/wmake/Makefile:183: Warnung: Alte Befehle für das Ziel ~/OpenFOAM/hongyi-1.4.1/lib/linux64GccDPOpt« werden ignoriert ~/OpenFOAM/OpenFOAM-1.4.1/wmake/Makefile:174: Warnung: Die Befehle für das Ziel ~/OpenFOAM/hongyi-1.4.1/lib/linux64GccDPOpt« werden überschrieben ~/OpenFOAM/OpenFOAM-1.4.1/wmake/Makefile:165: Warnung: Alte Befehle für das Ziel ~/OpenFOAM/hongyi-1.4.1/lib/linux64GccDPOpt« werden ignoriert ~/OpenFOAM/OpenFOAM-1.4.1/wmake/Makefile:183: Warnung: Die Befehle für das Ziel ~/OpenFOAM/hongyi-1.4.1/lib/linux64GccDPOpt« werden überschrieben ~/OpenFOAM/OpenFOAM-1.4.1/wmake/Makefile:174: Warnung: Alte Befehle für das Ziel ~/OpenFOAM/hongyi-1.4.1/lib/linux64GccDPOpt« werden ignoriert ~/OpenFOAM/OpenFOAM-1.4.1/wmake/Makefile:191: Warnung: Die Befehle für das Ziel ~/OpenFOAM/hongyi-1.4.1/lib/linux64GccDPOpt« werden überschrieben ~/OpenFOAM/OpenFOAM-1.4.1/wmake/Makefile:183: Warnung: Alte Befehle für das Ziel ~/OpenFOAM/hongyi-1.4.1/lib/linux64GccDPOpt« werden ignoriert Making dependency list for source file myOscillatingFixedValueFvPatchField.C could not open file fixedValueFvPatchFields.H for source file myOscillatingFixedValueFvPatchField.C Making dependency list for source file myOscillatingFixedValueFvPatchFields.C could not open file fixedValueFvPatchFields.H for source file myOscillatingFixedValueFvPatchFields.C could not open file volFields.H for source file myOscillatingFixedValueFvPatchFields.C ~/OpenFOAM/OpenFOAM-1.4.1/wmake/Makefile:174: Warnung: Die Befehle für das Ziel ~/OpenFOAM/hongyi-1.4.1/lib/linux64GccDPOpt« werden überschrieben ~/OpenFOAM/OpenFOAM-1.4.1/wmake/Makefile:165: Warnung: Alte Befehle für das Ziel ~/OpenFOAM/hongyi-1.4.1/lib/linux64GccDPOpt« werden ignoriert ~/OpenFOAM/OpenFOAM-1.4.1/wmake/Makefile:183: Warnung: Die Befehle für das Ziel ~/OpenFOAM/hongyi-1.4.1/lib/linux64GccDPOpt« werden überschrieben ~/OpenFOAM/OpenFOAM-1.4.1/wmake/Makefile:174: Warnung: Alte Befehle für das Ziel ~/OpenFOAM/hongyi-1.4.1/lib/linux64GccDPOpt« werden ignoriert ~/OpenFOAM/OpenFOAM-1.4.1/wmake/Makefile:191: Warnung: Die Befehle für das Ziel ~/OpenFOAM/hongyi-1.4.1/lib/linux64GccDPOpt« werden überschrieben ~/OpenFOAM/OpenFOAM-1.4.1/wmake/Makefile:183: Warnung: Alte Befehle für das Ziel ~/OpenFOAM/hongyi-1.4.1/lib/linux64GccDPOpt« werden ignoriert In file included from myOscillatingFixedValueFvPatchField.C:27: myOscillatingFixedValueFvPatchField.H:39:37: error: fixedValueFvPatchFields.H: Datei oder Verzeichnis nicht gefunden In file included from myOscillatingFixedValueFvPatchField.C:27: myOscillatingFixedValueFvPatchField.H:53: error: expected template-name before ‘<’ token myOscillatingFixedValueFvPatchField.H:53: error: expected `{' before ‘<’ token myOscillatingFixedValueFvPatchField.H:53: error: expected unqualified-id before ‘<’ token In file included from myOscillatingFixedValueFvPatchField.H:232, from myOscillatingFixedValueFvPatchField.C:27: myOscillatingFixedValueFvPatchField.C:38: error: invalid use of incomplete type ‘class Foam::myOscillatingFixedValueFvPatchField<Type>’ myOscillatingFixedValueFvPatchField.H:51: error: declaration of ‘class Foam::myOscillatingFixedValueFvPatchField<Type>’ myOscillatingFixedValueFvPatchField.C:53: error: expected ‘,’ or ‘...’ before ‘&’ token myOscillatingFixedValueFvPatchField.C:55: error: ISO C++ forbids declaration of ‘fvPatch’ with no type myOscillatingFixedValueFvPatchField.C:55: error: invalid use of incomplete type ‘class Foam::myOscillatingFixedValueFvPatchField<Type>’ myOscillatingFixedValueFvPatchField.H:51: error: declaration of ‘class Foam::myOscillatingFixedValueFvPatchField<Type>’ myOscillatingFixedValueFvPatchField.C:70: error: expected ‘,’ or ‘...’ before ‘&’ token myOscillatingFixedValueFvPatchField.C:73: error: ISO C++ forbids declaration of ‘fvPatch’ with no type myOscillatingFixedValueFvPatchField.C:73: error: invalid use of incomplete type ‘class Foam::myOscillatingFixedValueFvPatchField<Type>’ myOscillatingFixedValueFvPatchField.H:51: error: declaration of ‘class Foam::myOscillatingFixedValueFvPatchField<Type>’ myOscillatingFixedValueFvPatchField.C:87: error: expected ‘,’ or ‘...’ before ‘&’ token myOscillatingFixedValueFvPatchField.C:90: error: ISO C++ forbids declaration of ‘fvPatch’ with no type myOscillatingFixedValueFvPatchField.C:90: error: invalid use of incomplete type ‘class Foam::myOscillatingFixedValueFvPatchField<Type>’ myOscillatingFixedValueFvPatchField.H:51: error: declaration of ‘class Foam::myOscillatingFixedValueFvPatchField<Type>’ myOscillatingFixedValueFvPatchField.C:117: error: invalid use of incomplete type ‘class Foam::myOscillatingFixedValueFvPatchField<Type>’ myOscillatingFixedValueFvPatchField.H:51: error: declaration of ‘class Foam::myOscillatingFixedValueFvPatchField<Type>’ myOscillatingFixedValueFvPatchField.C:132: error: expected ‘,’ or ‘...’ before ‘<’ token myOscillatingFixedValueFvPatchField.C:133: error: ISO C++ forbids declaration of ‘DimensionedField’ with no type myOscillatingFixedValueFvPatchField.C:133: error: invalid use of incomplete type ‘class Foam::myOscillatingFixedValueFvPatchField<Type>’ myOscillatingFixedValueFvPatchField.H:51: error: declaration of ‘class Foam::myOscillatingFixedValueFvPatchField<Type>’ myOscillatingFixedValueFvPatchField.C:149: error: expected ‘,’ or ‘...’ before ‘&’ token myOscillatingFixedValueFvPatchField.C:150: error: ISO C++ forbids declaration of ‘fvPatchFieldMapper’ with no type myOscillatingFixedValueFvPatchField.C:150: error: invalid use of incomplete type ‘class Foam::myOscillatingFixedValueFvPatchField<Type>’ myOscillatingFixedValueFvPatchField.H:51: error: declaration of ‘class Foam::myOscillatingFixedValueFvPatchField<Type>’ myOscillatingFixedValueFvPatchField.C:160: error: expected ‘,’ or ‘...’ before ‘<’ token myOscillatingFixedValueFvPatchField.C:162: error: ISO C++ forbids declaration of ‘fvPatchField’ with no type myOscillatingFixedValueFvPatchField.C:162: error: invalid use of incomplete type ‘class Foam::myOscillatingFixedValueFvPatchField<Type>’ myOscillatingFixedValueFvPatchField.H:51: error: declaration of ‘class Foam::myOscillatingFixedValueFvPatchField<Type>’ myOscillatingFixedValueFvPatchField.C:174: error: invalid use of incomplete type ‘class Foam::myOscillatingFixedValueFvPatchField<Type>’ myOscillatingFixedValueFvPatchField.H:51: error: declaration of ‘class Foam::myOscillatingFixedValueFvPatchField<Type>’ myOscillatingFixedValueFvPatchField.C:195: error: invalid use of incomplete type ‘class Foam::myOscillatingFixedValueFvPatchField<Type>’ myOscillatingFixedValueFvPatchField.H:51: error: declaration of ‘class Foam::myOscillatingFixedValueFvPatchField<Type>’ myOscillatingFixedValueFvPatchField.C:38: error: invalid use of incomplete type ‘class Foam::myOscillatingFixedValueFvPatchField<Type>’ myOscillatingFixedValueFvPatchField.H:51: error: declaration of ‘class Foam::myOscillatingFixedValueFvPatchField<Type>’ myOscillatingFixedValueFvPatchField.C:53: error: expected ‘,’ or ‘...’ before ‘&’ token myOscillatingFixedValueFvPatchField.C:55: error: ISO C++ forbids declaration of ‘fvPatch’ with no type myOscillatingFixedValueFvPatchField.C:55: error: invalid use of incomplete type ‘class Foam::myOscillatingFixedValueFvPatchField<Type>’ myOscillatingFixedValueFvPatchField.H:51: error: declaration of ‘class Foam::myOscillatingFixedValueFvPatchField<Type>’ myOscillatingFixedValueFvPatchField.C:70: error: expected ‘,’ or ‘...’ before ‘&’ token myOscillatingFixedValueFvPatchField.C:73: error: ISO C++ forbids declaration of ‘fvPatch’ with no type myOscillatingFixedValueFvPatchField.C:73: error: invalid use of incomplete type ‘class Foam::myOscillatingFixedValueFvPatchField<Type>’ myOscillatingFixedValueFvPatchField.H:51: error: declaration of ‘class Foam::myOscillatingFixedValueFvPatchField<Type>’ myOscillatingFixedValueFvPatchField.C:87: error: expected ‘,’ or ‘...’ before ‘&’ token myOscillatingFixedValueFvPatchField.C:90: error: ISO C++ forbids declaration of ‘fvPatch’ with no type myOscillatingFixedValueFvPatchField.C:90: error: invalid use of incomplete type ‘class Foam::myOscillatingFixedValueFvPatchField<Type>’ myOscillatingFixedValueFvPatchField.H:51: error: declaration of ‘class Foam::myOscillatingFixedValueFvPatchField<Type>’ myOscillatingFixedValueFvPatchField.C:117: error: invalid use of incomplete type ‘class Foam::myOscillatingFixedValueFvPatchField<Type>’ myOscillatingFixedValueFvPatchField.H:51: error: declaration of ‘class Foam::myOscillatingFixedValueFvPatchField<Type>’ myOscillatingFixedValueFvPatchField.C:132: error: expected ‘,’ or ‘...’ before ‘<’ token myOscillatingFixedValueFvPatchField.C:133: error: ISO C++ forbids declaration of ‘DimensionedField’ with no type myOscillatingFixedValueFvPatchField.C:133: error: invalid use of incomplete type ‘class Foam::myOscillatingFixedValueFvPatchField<Type>’ myOscillatingFixedValueFvPatchField.H:51: error: declaration of ‘class Foam::myOscillatingFixedValueFvPatchField<Type>’ myOscillatingFixedValueFvPatchField.C:149: error: expected ‘,’ or ‘...’ before ‘&’ token myOscillatingFixedValueFvPatchField.C:150: error: ISO C++ forbids declaration of ‘fvPatchFieldMapper’ with no type myOscillatingFixedValueFvPatchField.C:150: error: invalid use of incomplete type ‘class Foam::myOscillatingFixedValueFvPatchField<Type>’ myOscillatingFixedValueFvPatchField.H:51: error: declaration of ‘class Foam::myOscillatingFixedValueFvPatchField<Type>’ myOscillatingFixedValueFvPatchField.C:160: error: expected ‘,’ or ‘...’ before ‘<’ token myOscillatingFixedValueFvPatchField.C:162: error: ISO C++ forbids declaration of ‘fvPatchField’ with no type myOscillatingFixedValueFvPatchField.C:162: error: invalid use of incomplete type ‘class Foam::myOscillatingFixedValueFvPatchField<Type>’ myOscillatingFixedValueFvPatchField.H:51: error: declaration of ‘class Foam::myOscillatingFixedValueFvPatchField<Type>’ myOscillatingFixedValueFvPatchField.C:174: error: invalid use of incomplete type ‘class Foam::myOscillatingFixedValueFvPatchField<Type>’ myOscillatingFixedValueFvPatchField.H:51: error: declaration of ‘class Foam::myOscillatingFixedValueFvPatchField<Type>’ myOscillatingFixedValueFvPatchField.C:195: error: invalid use of incomplete type ‘class Foam::myOscillatingFixedValueFvPatchField<Type>’ myOscillatingFixedValueFvPatchField.H:51: error: declaration of ‘class Foam::myOscillatingFixedValueFvPatchField<Type>’ make: *** [Make/linux64GccDPOpt/myOscillatingFixedValueFvPatchField.o] Fehler 1 Any advice? Thank you very much! |
|
April 3, 2009, 08:56 |
|
#4 |
Member
Ivor Clifford
Join Date: Mar 2009
Location: Switzerland
Posts: 94
Rep Power: 17 |
The clue is in:
could not open file fixedValueFvPatchFields.H for source file myOscillatingFixedValueFvPatchFields.C could not open file volFields.H for source file myOscillatingFixedValueFvPatchFields.C Seems that the compiler is not finding the OpenFOAM headers. look in the directory ${LIB_SRC}/finiteVolume/lnInclude and check that it contains the necessary linked headers. If the headers are missing you'll need to use the wmakelnInclude script to add them. Also, if I'm not mistaken you should remove myOscillatingFixedValueFvPatchField.C from your Make/files |
|
April 3, 2009, 09:53 |
|
#5 |
Member
Hy Yu
Join Date: Mar 2009
Location: Hessen, Germany
Posts: 34
Rep Power: 17 |
Yes, the both header-files are over there. And i have also removed the "myOscillatingFixedValueFvPatchField.C" from "Make/files".
At last i have tried to compile it and everything as same as last time happened again. I have uploaded my files, if you have time would you kindly look at it? Thanks a lot for your help! |
|
April 3, 2009, 10:47 |
|
#6 |
Member
Ivor Clifford
Join Date: Mar 2009
Location: Switzerland
Posts: 94
Rep Power: 17 |
Use the wclean utility and then try to compile again. Worked on my machine.
|
|
April 3, 2009, 11:32 |
|
#7 |
Member
Hy Yu
Join Date: Mar 2009
Location: Hessen, Germany
Posts: 34
Rep Power: 17 |
It is weird. Actually i have done many times using "wclean " after every compile before you told me.
The fact is that i received same error message as normal after every attempt. Any other advice? Thanks! |
|
April 3, 2009, 11:49 |
|
#8 |
Member
Ivor Clifford
Join Date: Mar 2009
Location: Switzerland
Posts: 94
Rep Power: 17 |
Remove all the commented lines from Make/options as well as the space between LIB = $(FOAM_USER_LIBBIN) and /libmyBCs in Make/files
|
|
April 3, 2009, 11:51 |
|
#9 |
Member
Ivor Clifford
Join Date: Mar 2009
Location: Switzerland
Posts: 94
Rep Power: 17 |
Oh, and you'll need to link libfiniteVolume as well, so just uncomment that line. Make/files then becomes:
myOscillatingFixedValueFvPatchFields.C LIB = $(FOAM_USER_LIBBIN)/libmyBCs Make/options becomes: EXE_INC = \ -I$(LIB_SRC)/finiteVolume/lnInclude EXE_LIBS = \ -lfiniteVolume |
|
April 3, 2009, 12:07 |
|
#10 |
Member
Hy Yu
Join Date: Mar 2009
Location: Hessen, Germany
Posts: 34
Rep Power: 17 |
It works.
Thank you very much! Have a nice weekend!!! |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Confusion between 'non-slip' and 'slip' B.C | jinwon park | Main CFD Forum | 7 | March 6, 2008 05:56 |
how to set such B.C. in Fluent? | Sherri | FLUENT | 1 | January 12, 2006 13:32 |
Urgent! Help on UDF to set B.C. of 3rd type | Ray Hong | FLUENT | 0 | December 28, 2005 20:35 |
How to set B.C. of the 2nd or 3rd type in UDS? | Ray Hong | FLUENT | 0 | December 28, 2005 07:03 |
Non-Reflecting B.C. in NSC2KE | Zou Chu | Main CFD Forum | 2 | May 27, 1999 22:26 |