CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM (http://www.cfd-online.com/Forums/openfoam/)
-   -   groovyBC in openFOAM-2.0 for parabolic velocity bc (http://www.cfd-online.com/Forums/openfoam/99168-groovybc-openfoam-2-0-parabolic-velocity-bc.html)

ofslcm March 27, 2012 12:55

groovyBC in openFOAM-2.0 for parabolic velocity bc
 
Hi,

I'm using in openFOAM-2.0 on a 3D case groovyBC to perform this parabolic inlet velocity profile:

U(0,y,z)=Um*y*z*(H-y)*(H-z)/h^4
V=0
W=0

where Um=4*U(0,H/2,H/2,t)

What I've implemented is:

in
{
type groovyBC;
variables "yp=pts().y;zp=pts().z;minZ=min(zp);maxZ=max(zp);H =(maxZ-minZ)/2;U@in=4*U(0,H,H)*normal();";
valueExpression "U*yp*zp*(H-yp)*(H-zp)/pow(H,4)";
}


and I got the following error message:

--> FOAM FATAL IO ERROR:
cannot find file

file: /Users/soledad/OpenFoam/soledad-2.0.0/run/Cylinder/incompressible/icoFoam/system/controlDict at line 0.

From function regIOobject::readStream()
in file db/regIOobject/regIOobjectRead.C at line 73.

FOAM exiting

As in the wiki says, I've added in the contolDict: libs ( "libgroovyBC.so" ) ;
Could you help me please?

Thank you

solOF

gschaider March 27, 2012 14:41

Quote:

Originally Posted by ofslcm (Post 351786)
and I got the following error message:

--> FOAM FATAL IO ERROR:
cannot find file

file: /Users/soledad/OpenFoam/soledad-2.0.0/run/Cylinder/incompressible/icoFoam/system/controlDict at line 0.

From function regIOobject::readStream()
in file db/regIOobject/regIOobjectRead.C at line 73.

FOAM exiting

As in the wiki says, I've added in the contolDict: libs ( "libgroovyBC.so" ) ;
Could you help me please?

Thank you

solOF

The problem is that there is no controlDict there (you're trying to run the solver in the directory of the sources not in a case-directory). It's got nothing to do with groovyBC

ofslcm March 27, 2012 18:39

Hi,

thank you for your quick response. But I don't understand what should I do. I've copied the folder groovyBC on a case directory and I've try to run the case again, but I still get the same error. This is the path:

~/OpenFoam/cases-2.0.0/run/Cylinder/incompressible/icoFoam/cylinder_00/groovyBC

Please, would you mind to explain it to me again?

Thank you

solOF

gschaider March 27, 2012 19:32

Quote:

Originally Posted by ofslcm (Post 351818)
Hi,

thank you for your quick response. But I don't understand what should I do. I've copied the folder groovyBC on a case directory and I've try to run the case again, but I still get the same error. This is the path:

~/OpenFoam/cases-2.0.0/run/Cylinder/incompressible/icoFoam/cylinder_00/groovyBC

Please, would you mind to explain it to me again?

Thank you

solOF

The original error message said basically "there is no control dict here". That has nothing to do with groovyBC

You don't have to copy the folder with the groovyBC-sources to the case. groovyBC has to be compiled once (see the instructions on the Wiki-page - the swak-page if you're using the groovyBC from there)

Then you'll have to prepare the case as described (also there) and you should be in business

ofslcm March 28, 2012 05:49

Hi,

thank you. I've already compiled groovyBC but I got the following:


Making dependency list for source file PatchValueExpressionDriver.C
could not open file edgeList.H for source file PatchValueExpressionDriver.C
could not open file point.H for source file PatchValueExpressionDriver.C
could not open file intersection.H for source file PatchValueExpressionDriver.C
could not open file HashSet.H for source file PatchValueExpressionDriver.C
could not open file objectHit.H for source file PatchValueExpressionDriver.C
could not open file PrimitivePatch.C for source file PatchValueExpressionDriver.C
could not open file face.H for source file PatchValueExpressionDriver.C
could not open file SubList.H for source file PatchValueExpressionDriver.C
could not open file pointField.H for source file PatchValueExpressionDriver.C
could not open file commSchedule.H for source file PatchValueExpressionDriver.C
could not open file globalMeshData.H for source file PatchValueExpressionDriver.C
could not open file cyclicPolyPatch.H for source file PatchValueExpressionDriver.C
could not open file GeometricFieldFunctions.C for source file PatchValueExpressionDriver.C
could not open file GeometricFieldFunctions.H for source file PatchValueExpressionDriver.C
could not open file GeometricFieldFunctionsM.H for source file PatchValueExpressionDriver.C
could not open file GeometricScalarField.C for source file PatchValueExpressionDriver.C
could not open file GeometricTensorField.H for source file PatchValueExpressionDriver.C
could not open file GeometricSphericalTensorField.H for source file PatchValueExpressionDriver.C
could not open file volMesh.H for source file PatchValueExpressionDriver.C
could not open file fvMesh.H for source file PatchValueExpressionDriver.C
could not open file fvPatchField.H for source file PatchValueExpressionDriver.C
could not open file volFieldsFwd.H for source file PatchValueExpressionDriver.C
could not open file calculatedFvPatchFields.H for source file PatchValueExpressionDriver.C
could not open file interpolationTable.H for source file PatchValueExpressionDriver.C
could not open file PatchResult.H for source file PatchValueExpressionDriver.C
could not open file PatchValueExpressionParser.tab.hh for source file PatchValueExpressionDriver.C
could not open file PatchValueExpressionDriverI.H for source file PatchValueExpressionDriver.C
could not open file Random.H for source file PatchValueExpressionDriver.C
SOURCE=PatchValueExpressionDriver.C ; g++-mp-4.5 -m64 -DdarwinIntel64 -DWM_DP -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -Wnon-virtual-dtor -O2 -DNoRepository -ftemplate-depth-100 -IMake/darwinIntel64Gcc45DPOpt -I/Users/soledad/OpenFoam/OF-Org-2.0/OpenFOAM-2.0.0/src/finiteVolume/lnInclude -IlnInclude -I. -I/Users/soledad/OpenFoam/OF-Org-2.0/OpenFOAM-2.0.0/src/OpenFOAM/lnInclude -I/Users/soledad/OpenFoam/OF-Org-2.0/OpenFOAM-2.0.0/src/OSspecific/POSIX/lnInclude -fPIC -Ddarwin -c $SOURCE -o Make/darwinIntel64Gcc45DPOpt/PatchValueExpressionDriver.o
SOURCE=groovyBCFvPatchFields.C ; g++-mp-4.5 -m64 -DdarwinIntel64 -DWM_DP -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -Wnon-virtual-dtor -O2 -DNoRepository -ftemplate-depth-100 -IMake/darwinIntel64Gcc45DPOpt -I/Users/soledad/OpenFoam/OF-Org-2.0/OpenFOAM-2.0.0/src/finiteVolume/lnInclude -IlnInclude -I. -I/Users/soledad/OpenFoam/OF-Org-2.0/OpenFOAM-2.0.0/src/OpenFOAM/lnInclude -I/Users/soledad/OpenFoam/OF-Org-2.0/OpenFOAM-2.0.0/src/OSspecific/POSIX/lnInclude -fPIC -Ddarwin -c $SOURCE -o Make/darwinIntel64Gcc45DPOpt/groovyBCFvPatchFields.o
SOURCE=groovyBCPointPatchFields.C ; g++-mp-4.5 -m64 -DdarwinIntel64 -DWM_DP -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -Wnon-virtual-dtor -O2 -DNoRepository -ftemplate-depth-100 -IMake/darwinIntel64Gcc45DPOpt -I/Users/soledad/OpenFoam/OF-Org-2.0/OpenFOAM-2.0.0/src/finiteVolume/lnInclude -IlnInclude -I. -I/Users/soledad/OpenFoam/OF-Org-2.0/OpenFOAM-2.0.0/src/OpenFOAM/lnInclude -I/Users/soledad/OpenFoam/OF-Org-2.0/OpenFOAM-2.0.0/src/OSspecific/POSIX/lnInclude -fPIC -Ddarwin -c $SOURCE -o Make/darwinIntel64Gcc45DPOpt/groovyBCPointPatchFields.o
'/Users/soledad/OpenFOAM/soledad-2.0.0/platforms/darwinIntel64Gcc45DPOpt/lib/libgroovyBC.dylib' is up to date.




It seems not to find .H files. I'm working with Mac and with openFOAM-2.0. I have Bison 2.3.

At the beginning I compiled groovyBC and I got the following error:

PatchValueExpressionDriver.C:192: error: expected unqualified-id before ‘::’ token

PatchValueExpressionDriver.C:202: error: expected unqualified-id before ‘::’ token

then I remove the Foam:: in these two lines.

Could you help me please?

Thank you

ofslcm March 28, 2012 07:33

Sorry, I forgot to add the error that I have when I'm running the case:


--> FOAM Warning :
From function dlLibraryTable::open(const fileName&)
in file db/dynamicLibrary/dlLibraryTable/dlLibraryTable.C at line 99
could not load "libgroovyBC.so"
Create mesh for time = 0

Reading transportProperties

Reading field p

Reading field U



--> FOAM FATAL IO ERROR:
Unknown patchField type groovyBC for patch type patch

Valid patchField types are :

thank you

gschaider March 28, 2012 07:53

Quote:

Originally Posted by ofslcm (Post 351897)
Hi,

thank you. I've already compiled groovyBC but I got the following:


Making dependency list for source file PatchValueExpressionDriver.C
could not open file edgeList.H for source file PatchValueExpressionDriver.C
could not open file point.H for source file PatchValueExpressionDriver.C
could not open file intersection.H for source file PatchValueExpressionDriver.C
could not open file HashSet.H for source file PatchValueExpressionDriver.C
could not open file objectHit.H for source file PatchValueExpressionDriver.C
could not open file PrimitivePatch.C for source file PatchValueExpressionDriver.C
could not open file face.H for source file PatchValueExpressionDriver.C
could not open file SubList.H for source file PatchValueExpressionDriver.C
could not open file pointField.H for source file PatchValueExpressionDriver.C
could not open file commSchedule.H for source file PatchValueExpressionDriver.C
could not open file globalMeshData.H for source file PatchValueExpressionDriver.C
could not open file cyclicPolyPatch.H for source file PatchValueExpressionDriver.C
could not open file GeometricFieldFunctions.C for source file PatchValueExpressionDriver.C
could not open file GeometricFieldFunctions.H for source file PatchValueExpressionDriver.C
could not open file GeometricFieldFunctionsM.H for source file PatchValueExpressionDriver.C
could not open file GeometricScalarField.C for source file PatchValueExpressionDriver.C
could not open file GeometricTensorField.H for source file PatchValueExpressionDriver.C
could not open file GeometricSphericalTensorField.H for source file PatchValueExpressionDriver.C
could not open file volMesh.H for source file PatchValueExpressionDriver.C
could not open file fvMesh.H for source file PatchValueExpressionDriver.C
could not open file fvPatchField.H for source file PatchValueExpressionDriver.C
could not open file volFieldsFwd.H for source file PatchValueExpressionDriver.C
could not open file calculatedFvPatchFields.H for source file PatchValueExpressionDriver.C
could not open file interpolationTable.H for source file PatchValueExpressionDriver.C
could not open file PatchResult.H for source file PatchValueExpressionDriver.C
could not open file PatchValueExpressionParser.tab.hh for source file PatchValueExpressionDriver.C
could not open file PatchValueExpressionDriverI.H for source file PatchValueExpressionDriver.C
could not open file Random.H for source file PatchValueExpressionDriver.C
SOURCE=PatchValueExpressionDriver.C ; g++-mp-4.5 -m64 -DdarwinIntel64 -DWM_DP -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -Wnon-virtual-dtor -O2 -DNoRepository -ftemplate-depth-100 -IMake/darwinIntel64Gcc45DPOpt -I/Users/soledad/OpenFoam/OF-Org-2.0/OpenFOAM-2.0.0/src/finiteVolume/lnInclude -IlnInclude -I. -I/Users/soledad/OpenFoam/OF-Org-2.0/OpenFOAM-2.0.0/src/OpenFOAM/lnInclude -I/Users/soledad/OpenFoam/OF-Org-2.0/OpenFOAM-2.0.0/src/OSspecific/POSIX/lnInclude -fPIC -Ddarwin -c $SOURCE -o Make/darwinIntel64Gcc45DPOpt/PatchValueExpressionDriver.o
SOURCE=groovyBCFvPatchFields.C ; g++-mp-4.5 -m64 -DdarwinIntel64 -DWM_DP -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -Wnon-virtual-dtor -O2 -DNoRepository -ftemplate-depth-100 -IMake/darwinIntel64Gcc45DPOpt -I/Users/soledad/OpenFoam/OF-Org-2.0/OpenFOAM-2.0.0/src/finiteVolume/lnInclude -IlnInclude -I. -I/Users/soledad/OpenFoam/OF-Org-2.0/OpenFOAM-2.0.0/src/OpenFOAM/lnInclude -I/Users/soledad/OpenFoam/OF-Org-2.0/OpenFOAM-2.0.0/src/OSspecific/POSIX/lnInclude -fPIC -Ddarwin -c $SOURCE -o Make/darwinIntel64Gcc45DPOpt/groovyBCFvPatchFields.o
SOURCE=groovyBCPointPatchFields.C ; g++-mp-4.5 -m64 -DdarwinIntel64 -DWM_DP -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -Wnon-virtual-dtor -O2 -DNoRepository -ftemplate-depth-100 -IMake/darwinIntel64Gcc45DPOpt -I/Users/soledad/OpenFoam/OF-Org-2.0/OpenFOAM-2.0.0/src/finiteVolume/lnInclude -IlnInclude -I. -I/Users/soledad/OpenFoam/OF-Org-2.0/OpenFOAM-2.0.0/src/OpenFOAM/lnInclude -I/Users/soledad/OpenFoam/OF-Org-2.0/OpenFOAM-2.0.0/src/OSspecific/POSIX/lnInclude -fPIC -Ddarwin -c $SOURCE -o Make/darwinIntel64Gcc45DPOpt/groovyBCPointPatchFields.o
'/Users/soledad/OpenFOAM/soledad-2.0.0/platforms/darwinIntel64Gcc45DPOpt/lib/libgroovyBC.dylib' is up to date.




It seems not to find .H files. I'm working with Mac and with openFOAM-2.0. I have Bison 2.3.

At the beginning I compiled groovyBC and I got the following error:

PatchValueExpressionDriver.C:192: error: expected unqualified-id before :: token

PatchValueExpressionDriver.C:202: error: expected unqualified-id before :: token

then I remove the Foam:: in these two lines.

Could you help me please?

Thank you

It seems that you're using the "old-school" groovyBC from http://openfoamwiki.net/index.php/Contrib_groovyBC

Have a look at the top of the page. There it says that support for this is discontinued with 2.0

ofslcm March 28, 2012 10:52

Hi,

thank you. I've already intall swak4Foam, but I have the following kind of error when I compile:

Making dependency list for source file funkyDoCalc.C
could not open file IOList.H for source file funkyDoCalc.C
could not open file CompactIOList.C for source file funkyDoCalc.C
could not open file labelIOList.H for source file funkyDoCalc.C
could not open file polyBoundaryMesh.H for source file funkyDoCalc.C
could not open file boundBox.H for source file funkyDoCalc.C
could not open file pointZoneMesh.H for source file funkyDoCalc.C
could not open file faceZoneMesh.H for source file funkyDoCalc.C
could not open file cellZoneMesh.H for source file funkyDoCalc.C
could not open file lduMesh.H for source file funkyDoCalc.C
could not open file fvBoundaryMesh.H for source file funkyDoCalc.C
could not open file surfaceInterpolation.H for source file funkyDoCalc.C
could not open file fvSchemes.H for source file funkyDoCalc.C
could not open file fvSolution.H for source file funkyDoCalc.C
could not open file data.H for source file funkyDoCalc.C
could not open file DimensionedField.H for source file funkyDoCalc.C
could not open file volFieldsFwd.H for source file funkyDoCalc.C
could not open file surfaceFieldsFwd.H for source file funkyDoCalc.C
could not open file pointFieldsFwd.H for source file funkyDoCalc.C
could not open file slicedVolFieldsFwd.H for source file funkyDoCalc.C
could not open file slicedSurfaceFieldsFwd.H for source file funkyDoCalc.C
could not open file fvPatchFvMeshTemplates.C for source file funkyDoCalc.C
could not open file fvc.H for source file funkyDoCalc.C
could not open file fvMatrices.H for source file funkyDoCalc.C
could not open file fvm.H for source file funkyDoCalc.C
could not open file linear.H for source file funkyDoCalc.C
could not open file uniformDimensionedFields.H for source file funkyDoCalc.C
could not open file calculatedFvPatchFields.H for source file funkyDoCalc.C
could not open file fixedValueFvPatchFields.H for source file funkyDoCalc.C
could not open file adjustPhi.H for source file funkyDoCalc.C
could not open file findRefCell.H for source file funkyDoCalc.C
could not open file constants.H for source file funkyDoCalc.C
could not open file argList.H for source file funkyDoCalc.C
could not open file timeSelector.H for source file funkyDoCalc.C
could not open file CommonValueExpressionDriver.H for source file funkyDoCalc.C
could not open file IFstream.H for source file funkyDoCalc.C
could not open file addRegionOption.H for source file funkyDoCalc.C
could not open file setRootCase.H for source file funkyDoCalc.C
could not open file createTime.H for source file funkyDoCalc.C
could not open file createNamedMesh.H for source file funkyDoCalc.C


and when I'm running the code I get:

Create time

--> FOAM Warning :
From function dlLibraryTable::open(const fileName&)
in file db/dynamicLibrary/dlLibraryTable/dlLibraryTable.C at line 99
could not load "libgroovyBC.so"
Create mesh for time = 0

Reading transportProperties

Reading field p



--> FOAM FATAL IO ERROR:
inconsistent patch and patchField types for
patch type symmetryPlane and patchField type zeroGradient

file: ./cylinder_00/0/p::boundaryField::base from line 26 to line 26.

From function fvPatchField<Type>::New(const fvPatch&, const DimensionedField<Type, volMesh>&, const dictionary&)
in file /Users/jomipp/OpenFoam/OF-Org-2.0/OpenFOAM-2.0.0/src/finiteVolume/lnInclude/fvPatchFieldNew.C at line 164.

FOAM exiting


I'm using Mac.

Could you help me?

Thank you

gschaider March 28, 2012 16:56

Quote:

Originally Posted by ofslcm (Post 351953)
Hi,

thank you. I've already intall swak4Foam, but I have the following kind of error when I compile:

What precisely do you mean with "have already installed"

Quote:

Originally Posted by ofslcm (Post 351953)
Making dependency list for source file funkyDoCalc.C
could not open file IOList.H for source file funkyDoCalc.C

<nipped redundant information>

could not open file createNamedMesh.H for source file funkyDoCalc.C

The utilities are the last part the compilation script compiles. What happens with the Libraries

The error messages you posted are not very helpful. What happens once g++ is called?

Quote:

Originally Posted by ofslcm (Post 351953)
and when I'm running the code I get:

Create time

--> FOAM Warning :
From function dlLibraryTable::open(const fileName&)
in file db/dynamicLibrary/dlLibraryTable/dlLibraryTable.C at line 99
could not load "libgroovyBC.so"
Create mesh for time = 0

Reading transportProperties

Reading field p

That is because it didn't compile properly

Quote:

Originally Posted by ofslcm (Post 351953)

--> FOAM FATAL IO ERROR:
inconsistent patch and patchField types for
patch type symmetryPlane and patchField type zeroGradient

file: ./cylinder_00/0/p::boundaryField::base from line 26 to line 26.

From function fvPatchField<Type>::New(const fvPatch&, const DimensionedField<Type, volMesh>&, const dictionary&)
in file /Users/jomipp/OpenFoam/OF-Org-2.0/OpenFOAM-2.0.0/src/finiteVolume/lnInclude/fvPatchFieldNew.C at line 164.

FOAM exiting

That is a general misconfiguration of the case. A symmetryPlan only allows symmetry-BC

Quote:

Originally Posted by ofslcm (Post 351953)

I'm using Mac.

Could you help me?

Thank you


ofslcm March 29, 2012 06:44

Hi,

thank you. I've already corrected the problem with the symmetryPlane BC.

Related to compilation: I have download swak4Foam and as it says in the wiki, I've compiled the files with wmake all, however I have many problems, since some files cannot be opened. Could you help me? This is the first part of the compilation error. It seems no to find the libraries:


Bison is version 2.3
No 'swakConfiguration'. Python etc won't work
OpenFOAM-version: Major 2 Minor 0 Patch 0
No Libraries/swak4FoamParsers/foamVersion4swak.H. Generated
wmakeLnInclude: linking include files to ./lnInclude
Making dependency list for source file SurfacesRepository.C
could not open file PrimitivePatchMeshData.C for source file SurfacesRepository.C
could not open file PrimitivePatchMeshEdges.C for source file SurfacesRepository.C
could not open file PrimitivePatchPointAddressing.C for source file SurfacesRepository.C
could not open file PrimitivePatchProjectPoints.C for source file SurfacesRepository.C
could not open file PrimitivePatchCheck.C for source file SurfacesRepository.C
could not open file labelPair.H for source file SurfacesRepository.C
could not open file boundBox.H for source file SurfacesRepository.C
could not open file pointZoneMesh.H for source file SurfacesRepository.C
could not open file faceZoneMesh.H for source file SurfacesRepository.C
could not open file cellZoneMesh.H for source file SurfacesRepository.C
could not open file coordinateSystems.H for source file SurfacesRepository.C
could not open file interpolation.H for source file SurfacesRepository.C
could not open file sampledSurfaceTemplates.C for source file SurfacesRepository.C
Making dependency list for source file SetsRepository.C

gschaider March 31, 2012 16:30

Quote:

Originally Posted by ofslcm (Post 352150)
Hi,

thank you. I've already corrected the problem with the symmetryPlane BC.

Related to compilation: I have download swak4Foam and as it says in the wiki, I've compiled the files with wmake all, however I have many problems, since some files cannot be opened. Could you help me? This is the first part of the compilation error. It seems no to find the libraries:


Bison is version 2.3
No 'swakConfiguration'. Python etc won't work
OpenFOAM-version: Major 2 Minor 0 Patch 0
No Libraries/swak4FoamParsers/foamVersion4swak.H. Generated
wmakeLnInclude: linking include files to ./lnInclude
Making dependency list for source file SurfacesRepository.C
could not open file PrimitivePatchMeshData.C for source file SurfacesRepository.C
could not open file PrimitivePatchMeshEdges.C for source file SurfacesRepository.C
could not open file PrimitivePatchPointAddressing.C for source file SurfacesRepository.C
could not open file PrimitivePatchProjectPoints.C for source file SurfacesRepository.C
could not open file PrimitivePatchCheck.C for source file SurfacesRepository.C
could not open file labelPair.H for source file SurfacesRepository.C
could not open file boundBox.H for source file SurfacesRepository.C
could not open file pointZoneMesh.H for source file SurfacesRepository.C
could not open file faceZoneMesh.H for source file SurfacesRepository.C
could not open file cellZoneMesh.H for source file SurfacesRepository.C
could not open file coordinateSystems.H for source file SurfacesRepository.C
could not open file interpolation.H for source file SurfacesRepository.C
could not open file sampledSurfaceTemplates.C for source file SurfacesRepository.C
Making dependency list for source file SetsRepository.C

a) what are the first errors of the "real" compilation (from g++)

b) what does
ls $FOAM_SRC/OpenFOAM/lnInclude/PrimitivePatchMeshData.C
say (is the file found)

c) what does
ulimit -a
say (because if the rest of the compilation works this might be an issue with the number of file-descriptors)

ofslcm April 7, 2012 10:42

Thank you for the help.

The problem is solved. I need to change the extension ".so" by ".dylib" and openFoam is finding the library :)

solOF

Mojtaba.a August 14, 2012 08:34

Quote:

Originally Posted by ofslcm (Post 353599)
Thank you for the help.

The problem is solved. I need to change the extension ".so" by ".dylib" and openFoam is finding the library :)

solOF

Can you explain where you have changed the extension ".so" by ".dylib" ?
I have the same problem

ofslcm August 14, 2012 10:13

In the controlDict, where you call to your function, change the extension .so by .dylib, for example: forces.dylib

Mojtaba.a August 14, 2012 10:28

Quote:

Originally Posted by ofslcm (Post 377055)
In the controlDict, where you call to your function, change the extension .so by .dylib, for example: forces.dylib

Thanks, that solved my problem :)

gschaider August 20, 2012 16:52

Quote:

Originally Posted by ofslcm (Post 377055)
In the controlDict, where you call to your function, change the extension .so by .dylib, for example: forces.dylib

Is that on a Mac? Which version of OF-patches for that do you use? The one I published replace ".so" with ".dylib" on the fly. So you can keep "libfoo.so" in the files and OF will look for "libfoo.dylib". That way the case works on Linux and MacOSX

Raymond.Leoi August 15, 2013 08:41

inlet { type groovyBC; variables "yp=pts().y;minY=min(yp);maxY=max(yp);para=-(maxY-pos().y)*(pos().y-minY)/(0.25*pow(maxY-minY,2))*normal();"; valueExpression "10*(1+0.5*sin(500*time()))*para"; value uniform (10 0 0); }

The above is an example for groovxyBC in OFwiki. The valueExpression shows a time-dependent variable. I supposed it's for velocities. Why is a constant velocity vector specified at the end?

gschaider August 15, 2013 12:40

Quote:

Originally Posted by Raymond.Leoi (Post 445953)
inlet { type groovyBC; variables "yp=pts().y;minY=min(yp);maxY=max(yp);para=-(maxY-pos().y)*(pos().y-minY)/(0.25*pow(maxY-minY,2))*normal();"; valueExpression "10*(1+0.5*sin(500*time()))*para"; value uniform (10 0 0); }

The above is an example for groovxyBC in OFwiki. The valueExpression shows a time-dependent variable. I supposed it's for velocities. Why is a constant velocity vector specified at the end?

You mean "value uniform (10 0 0);"? That is there to keep Paraview and other tools that don't know groovyBC happy

linch August 23, 2013 12:02

Hi Bernhard,

Quote:

Originally Posted by ofslcm (Post 352150)
Related to compilation: I have download swak4Foam and as it says in the wiki, I've compiled the files with wmake all, however I have many problems, since some files cannot be opened. Could you help me? This is the first part of the compilation error. It seems no to find the libraries:


Bison is version 2.3
No 'swakConfiguration'. Python etc won't work
...

I have the same problem trying to compile swak4foam:
Code:

No 'swakConfiguration'. Python etc won't work
Checking swak4Foam-version and generating file
Traceback (most recent call last):
  File "./maintainanceScripts/makeSwakVersionFile.py", line 8, in <module>
    output = Popen(["hg", "branch"], stdout=PIPE).communicate()[0]
  File "/usr/lib/python2.7/subprocess.py", line 679, in __init__
    errread, errwrite)
  File "/usr/lib/python2.7/subprocess.py", line 1259, in _execute_child
    raise child_exception
OSError: [Errno 2] No such file or directory
Bison is version 2.5
Flex is version 2.5.35 (Minor version: 35)
OpenFOAM-version: Major 2 Minor 1 Patch x
No swak4FoamParsers/foamVersion4swak.H. Generated
wmakeLnInclude: linking include files to ./lnInclude
Making dependency list for source file helpers/printSwakVersion.C
Making dependency list for source file repositories/SurfacesRepository.C
Making dependency list for source file repositories/SetsRepository.C
Making dependency list for source file repositories/GlobalVariablesRepository.C
Making dependency list for source file ExpressionDriverWriter.C
Making dependency list for source file ExpressionResult/ExpressionResult.C
Making dependency list for source file ExpressionResult/StoredExpressionResult.C
Making dependency list for source file ExpressionResult/DelayedExpressionResult.C
Making dependency list for source file setsAndSurfaces/swakRegistryProxySurface.C
Making dependency list for source file setsAndSurfaces/swakRegistryProxySet.C
Making dependency list for source file FieldValueExpressionParser.yy
could not open file FieldValueExpressionParser.tab.hh for source file FieldValueExpressionParser.yy
could not open file FixedValuePointPatchField.H for source file FieldValueExpressionParser.yy
could not open file ZeroGradientPointPatchField.H for source file FieldValueExpressionParser.yy
could not open file CalculatedPointPatchField.H for source file FieldValueExpressionParser.yy
Making dependency list for source file PatchValueExpressionParser.yy
could not open file PatchValueExpressionParser.tab.hh for source file PatchValueExpressionParser.yy
Making dependency list for source file SubsetValueExpressionParser.yy
could not open file SubsetValueExpressionParser.tab.hh for source file SubsetValueExpressionParser.yy
Making dependency list for source file CommonValueExpressionDriver.C
Making dependency list for source file makeSwakDataEntry.C
Making dependency list for source file FieldValueExpressionLexer.ll
could not open file FieldValueExpressionParser.tab.hh for source file FieldValueExpressionLexer.ll
could not open file FixedValuePointPatchField.H for source file FieldValueExpressionLexer.ll
could not open file ZeroGradientPointPatchField.H for source file FieldValueExpressionLexer.ll
could not open file CalculatedPointPatchField.H for source file FieldValueExpressionLexer.ll
Making dependency list for source file FieldValueExpressionDriver.C
could not open file FieldValueExpressionParser.tab.hh for source file FieldValueExpressionDriver.C
could not open file FixedValuePointPatchField.H for source file FieldValueExpressionDriver.C
could not open file ZeroGradientPointPatchField.H for source file FieldValueExpressionDriver.C
could not open file CalculatedPointPatchField.H for source file FieldValueExpressionDriver.C
Making dependency list for source file PatchValueExpressionLexer.ll
could not open file PatchValueExpressionParser.tab.hh for source file PatchValueExpressionLexer.ll
Making dependency list for source file PatchValueExpressionDriver.C
could not open file PatchValueExpressionParser.tab.hh for source file PatchValueExpressionDriver.C
could not open file FieldValueExpressionParser.tab.hh for source file PatchValueExpressionDriver.C
could not open file FixedValuePointPatchField.H for source file PatchValueExpressionDriver.C
could not open file ZeroGradientPointPatchField.H for source file PatchValueExpressionDriver.C
could not open file CalculatedPointPatchField.H for source file PatchValueExpressionDriver.C
could not open file SubsetValueExpressionParser.tab.hh for source file PatchValueExpressionDriver.C

Am I missing some package? Some infos:
- OF-2.1.x
Code:

uname -a:
Linux master 3.2.0-4-amd64 #1 SMP Debian 3.2.41-2+deb7u2 x86_64 GNU/Linux

Code:

ulimit -a:
core file size          (blocks, -c) 0
data seg size          (kbytes, -d) unlimited
scheduling priority            (-e) 0
file size              (blocks, -f) unlimited
pending signals                (-i) 96202
max locked memory      (kbytes, -l) unlimited
max memory size        (kbytes, -m) unlimited
open files                      (-n) 1024
pipe size            (512 bytes, -p) 8
POSIX message queues    (bytes, -q) 819200
real-time priority              (-r) 0
stack size              (kbytes, -s) 65536
cpu time              (seconds, -t) unlimited
max user processes              (-u) 96202
virtual memory          (kbytes, -v) unlimited
file locks                      (-x) unlimited

Code:

gcc --version:
gcc (Debian 4.7.2-5) 4.7.2

Best regards,
Ilya

gschaider August 23, 2013 14:13

Quote:

Originally Posted by linch (Post 447712)
Hi Bernhard,



I have the same problem trying to compile swak4foam: [CODE]No 'swakConfiguration'. Python etc won't work
Checking swak4Foam-version and generating file
Traceback (most recent call last):
File "./maintainanceScripts/makeSwakVersionFile.py", line 8, in <module>
output = Popen(["hg", "branch"], stdout=PIPE).communicate()[0]
File "/usr/lib/python2.7/subprocess.py", line 679, in __init__
errread, errwrite)
File "/usr/lib/python2.7/subprocess.py", line 1259, in _execute_child
raise child_exception
OSError: [Errno 2] No such file or directory
Bison is version 2.5
Flex is version 2.5.35 (Minor version: 35)
OpenFOAM-version: Major 2 Minor 1 Patch x
No swak4FoamParsers/foamVersion4swak.H. Generated

Hm. That is a rather old version of swak you're using. Isn't it? According to the source repository I fixed this last december and since then there have been at least 3 releases.

Anyway. This is only because you have no mercurial installed and doesn't affect the rest of the compilation anyway (the script generates the header file with the version information and in the end it would have said "oh. that didn't change" and left the file alone).

But do yourself a favour: get the latest version


All times are GMT -4. The time now is 17:40.