Quote:
I only did one exploratory compilation with it which seems to show that there will be critically changes to the grammar required. I'm not even sure whether it will be possible to support 2.x and 3.x with the same source files. Due to time constraints and as I didn't expect any Linux-distributions that are used for work to incorporate this yet (as a change of bison might break lots of things) I didn't follow up yet. For the time being I recommend using bison 2.x. I will eventually have a look at compiling swak with bison 3.0 but as long as the majority of the enterprise Linuxes has bison 2.x it will be an absolute priority to support it. Of course if someone finds a way to compile swak with bison 3.x I will gladly accept the patches (IF THEY DON'T BREAK COMPILATION WITH BISON 2.x) |
Well, thanks for the heads up, I'll then compile bison 2.7 and use it. Also, maybe it would be a good idea to include this in the readme, I understand bison 3.0 may not be that widely used, but been there doesn't hurt anybody :)
Thanks for you time |
1 Attachment(s)
I use OF 2.2.0
I install flex and bison but I have problems with swak4foam itself this is the error what should I do? any help would be appreciated br Mohsen |
Quote:
Code:
chmod -R +x All* *.py |
ok Bruno
I will do as you said |
Quote:
|
Try:
Code:
(find . -name "All*" | find . -name "*.py") | xargs chmod +x |
Quote:
must I do some changes in swakconfig.debian file and swakconfig.example file Bruno? I get confused :( |
@Mohsen: Please describe in detail how exactly you have downloaded, unpacked and tried to build swak4Foam.
|
Quote:
I checked whether I have flex on my system,the answer is yes then I used " sudo bash ./configure" because the "permission error" occurred. then " sudo wmake" and bison 2.7 is installed then I extract your file on my system and use " sudo ./Allwmake" and an error occurred which was shown in the last reply thread of mine :( |
Quote:
|
Quote:
OK! thanks for your hints,I will follow your steps. |
2 Attachment(s)
Hi dear Bruno
I think it is done! you are awesome ;) It takes too long to compile the code( about 10 mins) I use a second ./Allwmake and attached the result in the following file but when I used groovy bc as a type of bcs OpenFOAM cant find it please see the error best regards Mohsen |
Quote:
I forgot to add this lines to controldict :) it is OK now libs ( "libOpenFOAM.so" "libgroovyBC.so" "libsimpleSwakFunctionObjects.so" "libswakFunctionObjects.so" ) ; thanks again Bruno |
Quote:
Quote:
|
Quote:
I under-estimate the time, ;) sure.It takes much longer :) |
Greetings to all!
I've updated the instructions on the "Building" section: http://openfoamwiki.net/index.php/Co...4Foam#Building The "tip" indicates how you can build swak4Foam with multi-core capabilities, therefore reducing the time needed to build it. Note: It does not affect how it will operate afterwords, it only affects the building process. Best regards, Bruno |
Error installing swak4Foam
Hi all,
When I install swak4foam, there are some errors in it. Can somebody help me to sort it out? The log file for second ./Allwmake is below. ./Allwmake No 'swakConfiguration'. Python etc won't work Checking swak4Foam-version and generating file Swak version is 0.2.4 Bison is version 2.5 Flex is version 2.5.35 (Minor version: 35) OpenFOAM-version: Major 2 Minor 2 Patch 1 (-1 == x) No change to swak4FoamParsers/foamVersion4swak.H '/home/fg312/OpenFOAM/fg312-2.2.1/platforms/linux64GccDPOpt/lib/libswak4FoamParsers.so' is up to date. '/home/fg312/OpenFOAM/fg312-2.2.1/platforms/linux64GccDPOpt/lib/libgroovyBC.so' is up to date. SOURCE=manipulateFieldFunctionObject.C ; g++ -m64 -Dlinux64 -DWM_DP -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -Wnon-virtual-dtor -O3 -DNoRepository -ftemplate-depth-100 -I../swak4FoamParsers/lnInclude -I/opt/openfoam221/src/finiteVolume/lnInclude -I/opt/openfoam221/src/meshTools/lnInclude -I/opt/openfoam221/src/sampling/lnInclude -I/opt/openfoam221/src/fileFormats/lnInclude -I/opt/openfoam221/src/triSurface/lnInclude -I/opt/openfoam221/src//postProcessing/functionObjects/utilities/lnInclude -I/opt/openfoam221/src/lagrangian/basic/lnInclude -IlnInclude -I. -I/opt/openfoam221/src/OpenFOAM/lnInclude -I/opt/openfoam221/src/OSspecific/POSIX/lnInclude -fPIC -c $SOURCE -o Make/linux64GccDPOpt/manipulateFieldFunctionObject.o In file included from /opt/openfoam221/src/OpenFOAM/lnInclude/OutputFilterFunctionObject.H:225:0, from manipulateFieldFunctionObject.H:50, from manipulateFieldFunctionObject.C:37: /opt/openfoam221/src/OpenFOAM/lnInclude/OutputFilterFunctionObject.C: In member function ‘bool Foam::OutputFilterFunctionObject<OutputFilter>::ti meSet() [with OutputFilter = Foam::manipulateField]’: manipulateFieldFunctionObject.C:51:1: instantiated from here /opt/openfoam221/src/OpenFOAM/lnInclude/OutputFilterFunctionObject.C:215:9: error: ‘class Foam::manipulateField’ has no member named ‘timeSet’ make: *** [Make/linux64GccDPOpt/manipulateFieldFunctionObject.o] Error 1 SOURCE=misc/readAndUpdateFields/readAndUpdateFieldsFunctionObject.C ; g++ -m64 -Dlinux64 -DWM_DP -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -Wnon-virtual-dtor -O3 -DNoRepository -ftemplate-depth-100 -I../swak4FoamParsers/lnInclude -I/opt/openfoam221/src/finiteVolume/lnInclude -I/opt/openfoam221/src/meshTools/lnInclude -I/opt/openfoam221/src/sampling/lnInclude -I/opt/openfoam221/src/triSurface/lnInclude -I/opt/openfoam221/src/thermophysicalModels/basic/lnInclude -I/opt/openfoam221/src/thermophysicalModels/reactionThermo/lnInclude -I/opt/openfoam221/src/thermophysicalModels/specie/lnInclude -I/opt/openfoam221/src/thermophysicalModels/SLGThermo/lnInclude -I/opt/openfoam221/src/thermophysicalModels/properties/solidMixtureProperties/lnInclude -I/opt/openfoam221/src/thermophysicalModels/properties/liquidMixtureProperties/lnInclude -I/opt/openfoam221/src/thermophysicalModels/properties/solidProperties/lnInclude -I/opt/openfoam221/src/thermophysicalModels/properties/liquidProperties/lnInclude -I/opt/openfoam221/src/regionModels/regionModel/lnInclude -I/opt/openfoam221/src/regionModels/surfaceFilmModels/lnInclude -I/opt/openfoam221/src/turbulenceModels -I/opt/openfoam221/src/transportModels -I/opt/openfoam221/src/lagrangian/basic/lnInclude -IlnInclude -I. -I/opt/openfoam221/src/OpenFOAM/lnInclude -I/opt/openfoam221/src/OSspecific/POSIX/lnInclude -fPIC -c $SOURCE -o Make/linux64GccDPOpt/readAndUpdateFieldsFunctionObject.o In file included from /opt/openfoam221/src/OpenFOAM/lnInclude/OutputFilterFunctionObject.H:225:0, from misc/readAndUpdateFields/readAndUpdateFieldsFunctionObject.H:50, from misc/readAndUpdateFields/readAndUpdateFieldsFunctionObject.C:36: /opt/openfoam221/src/OpenFOAM/lnInclude/OutputFilterFunctionObject.C: In member function ‘bool Foam::OutputFilterFunctionObject<OutputFilter>::ti meSet() [with OutputFilter = Foam::readAndUpdateFields]’: misc/readAndUpdateFields/readAndUpdateFieldsFunctionObject.C:50:1: instantiated from here /opt/openfoam221/src/OpenFOAM/lnInclude/OutputFilterFunctionObject.C:215:9: error: ‘class Foam::readAndUpdateFields’ has no member named ‘timeSet’ make: *** [Make/linux64GccDPOpt/readAndUpdateFieldsFunctionObject.o] Error 1 '/home/fg312/OpenFOAM/fg312-2.2.1/platforms/linux64GccDPOpt/lib/libsimpleLagrangianFunctionObjects.so' is up to date. '/home/fg312/OpenFOAM/fg312-2.2.1/platforms/linux64GccDPOpt/lib/libsimpleSearchableSurfaces.so' is up to date. '/home/fg312/OpenFOAM/fg312-2.2.1/platforms/linux64GccDPOpt/lib/libsimpleSwakFunctionObjects.so' is up to date. '/home/fg312/OpenFOAM/fg312-2.2.1/platforms/linux64GccDPOpt/lib/libswakTopoSources.so' is up to date. '/home/fg312/OpenFOAM/fg312-2.2.1/platforms/linux64GccDPOpt/lib/libswakSourceFields.so' is up to date. '/home/fg312/OpenFOAM/fg312-2.2.1/platforms/linux64GccDPOpt/lib/libgroovyStandardBCs.so' is up to date. SWAK_PYTHON_INCLUDE not defined .... no Python-Integration '/home/fg312/OpenFOAM/fg312-2.2.1/platforms/linux64GccDPOpt/lib/libswakMeshQualityFunctionPlugin.so' is up to date. '/home/fg312/OpenFOAM/fg312-2.2.1/platforms/linux64GccDPOpt/lib/libswakLocalCalculationsFunctionPlugin.so' is up to date. '/home/fg312/OpenFOAM/fg312-2.2.1/platforms/linux64GccDPOpt/lib/libswakRandomFunctionPlugin.so' is up to date. '/home/fg312/OpenFOAM/fg312-2.2.1/platforms/linux64GccDPOpt/lib/libswakFvcSchemesFunctionPlugin.so' is up to date. '/home/fg312/OpenFOAM/fg312-2.2.1/platforms/linux64GccDPOpt/lib/libswakThermoTurbFunctionPlugin.so' is up to date. '/home/fg312/OpenFOAM/fg312-2.2.1/platforms/linux64GccDPOpt/lib/libswakTransportTurbFunctionPlugin.so' is up to date. '/home/fg312/OpenFOAM/fg312-2.2.1/platforms/linux64GccDPOpt/lib/libswakSurfacesAndSetsFunctionPlugin.so' is up to date. '/home/fg312/OpenFOAM/fg312-2.2.1/platforms/linux64GccDPOpt/lib/libswakLagrangianCloudSourcesFunctionPlugin.so' is up to date. '/home/fg312/OpenFOAM/fg312-2.2.1/platforms/linux64GccDPOpt/lib/libswakVelocityFunctionPlugin.so' is up to date. '/home/fg312/OpenFOAM/fg312-2.2.1/platforms/linux64GccDPOpt/lib/libswakChemistryModelFunctionPlugin.so' is up to date. '/home/fg312/OpenFOAM/fg312-2.2.1/platforms/linux64GccDPOpt/lib/libswakRadiationModelFunctionPlugin.so' is up to date. make[1]: Entering directory `/home/fg312/OpenFOAM/swak4foam-master/Utilities/calcNonUniformOffsetsForMapped' make[1]: `/home/fg312/OpenFOAM/fg312-2.2.1/platforms/linux64GccDPOpt/bin/calcNonUniformOffsetsForMapped' is up to date. make[1]: Leaving directory `/home/fg312/OpenFOAM/swak4foam-master/Utilities/calcNonUniformOffsetsForMapped' make[1]: Entering directory `/home/fg312/OpenFOAM/swak4foam-master/Utilities/funkyDoCalc' make[1]: `/home/fg312/OpenFOAM/fg312-2.2.1/platforms/linux64GccDPOpt/bin/funkyDoCalc' is up to date. make[1]: Leaving directory `/home/fg312/OpenFOAM/swak4foam-master/Utilities/funkyDoCalc' make[1]: Entering directory `/home/fg312/OpenFOAM/swak4foam-master/Utilities/funkySetBoundaryField' make[1]: `/home/fg312/OpenFOAM/fg312-2.2.1/platforms/linux64GccDPOpt/bin/funkySetBoundaryField' is up to date. make[1]: Leaving directory `/home/fg312/OpenFOAM/swak4foam-master/Utilities/funkySetBoundaryField' make[1]: Entering directory `/home/fg312/OpenFOAM/swak4foam-master/Utilities/funkySetFields' make[1]: `/home/fg312/OpenFOAM/fg312-2.2.1/platforms/linux64GccDPOpt/bin/funkySetFields' is up to date. make[1]: Leaving directory `/home/fg312/OpenFOAM/swak4foam-master/Utilities/funkySetFields' make[1]: Entering directory `/home/fg312/OpenFOAM/swak4foam-master/Utilities/replayTransientBC' make[1]: `/home/fg312/OpenFOAM/fg312-2.2.1/platforms/linux64GccDPOpt/bin/replayTransientBC' is up to date. make[1]: Leaving directory `/home/fg312/OpenFOAM/swak4foam-master/Utilities/replayTransientBC' If you want to use swakCoded-function object or compile software based on swak set the environment variable SWAK4FOAM_SRC to /home/fg312/OpenFOAM/swak4foam-master/Libraries (most people will be fine without setting that variable) If I ignore those, when I use funkySetField with expression "pos().y <= 0.005*cos(pi*(pos().x+0.05)/0.1) ? 1 : 0"; to define my water free surface, it is fine; but with expression "average(fpos().y < surf(0.) ? surf(1.0) : surf(0.))"; there are fatal error. --> FOAM FATAL ERROR: Parser Error for driver FieldValueExpressionDriver at "1.28" :"field � not existing or of wrong type" "average(fpos().y < surf(0.) ? surf(1.0) : surf(0.))" ^ -----------------------------| Context of the error: - Driver constructed from scratch Evaluating expression "average(fpos().y < surf(0.) ? surf(1.0) : surf(0.))" From function parsingValue in file lnInclude/CommonValueExpressionDriverI.H at line 1081. FOAM exiting |
Quote:
This was fixed some time ago in the development-version (of swak) but not yet in the released version (will come with the next release). Until then you'll have to pull the development version and compile that Quote:
The � in your output: does it really look like this? My suspicion is that there is a character in the expression-string that the Lexer can not interpret. I see that you use whitespaces in your expression-string. That should be OK, but could you remove the spaces and try it again? |
Quote:
Thank you very much for you reply. I will try to download the development version and compile it later. For the second question, once I remove the whitespaces in the expression-string, the different error appeared (see below). Create mesh for time = 0 Time = 0 Using funkySetFieldsDict Part: setLower Modifying field alpha1 of type volScalarField Putting "average(fpos().y<surf(0.)?surf(1.0):surf(0.)) " into field alpha1 at t = "0" if condition "true" is true Keeping patches unaltered --> FOAM FATAL ERROR: inconsistent types: alpha1 is volScalarField while the expression evaluates to a surfaceScalarField From function doAnExpression() in file funkySetFields.C at line 359. FOAM exiting |
All times are GMT -4. The time now is 20:27. |