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 |
Quote:
|
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 |
Quote:
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 |
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 |
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 |
Quote:
Have a look at the top of the page. There it says that support for this is discontinued with 2.0 |
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 |
Quote:
Quote:
The error messages you posted are not very helpful. What happens once g++ is called? Quote:
Quote:
Quote:
|
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 |
Quote:
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) |
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 |
Quote:
I have the same problem |
In the controlDict, where you call to your function, change the extension .so by .dylib, for example: forces.dylib
|
Quote:
|
Quote:
|
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? |
Quote:
|
Hi Bernhard,
Quote:
Code:
No 'swakConfiguration'. Python etc won't work - OF-2.1.x Code:
uname -a: Code:
ulimit -a: Code:
gcc --version: Ilya |
Quote:
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 |
1 Attachment(s)
The version was 0.2.3 (next to last according to Swak4Foam-Wiki) and suitable to OF up to 2.2 (2.1 is the one I use).
Now I've got v0.2.4 (release, available via svn, must be the latest one), but the errors are still there. There are also a couple of other error related to openmpi (see attachment for the full log) Code:
/home/shevchuk/OpenFOAM/OpenFOAM-2.1.x/platforms/linux64GccDPOpt/lib/openmpi-system/libPstream.so: undefined reference to `MPI_Waitall' Best regards, Ilya |
Quote:
What version of Linux are you using? |
Thanks Bernhard,
the problem was indeed somewhere else. I was looking for it for a while with our admin, who takes care of the cluster. Finally, his conclusion was that the openmpi installed on the cluster was compiled with intel compiler while OF uses gcc. However, compiling ThirdPartys and src's caused no errors, these errors occurred only while compiling some application and swak4foam. After recompiling the openmpi with gcc, everything was ok. Nevertheless, the warnings Quote:
Thank you for the hints and best regards, Ilya |
groovyBC problems
Hi guys,
it's my first time using groovyBC and I'm trying to set up a parabolic profile of inlet velocity. What I'm doing is editing the U file to have the following code for inlet Code:
inlet Code:
libs ("libOpenFOAM.so" Code:
Create time |
Hi Bernhard,
I use openfoam/2.3.0 on a virtual machine (MASSIVE). I try to implement a zero flux condition via swaf4foam. I have swak4foam/2.3.0. I guess it is well installed as the answer to the command module show swak4foam/2.3.0 ------------------------------------------------------------------- /usr/local/Modules/modulefiles/swak4foam/2.3.0: conflict swak4foam module load openfoam/2.3.0 module load bison module-whatis An OpenFOAM library that combines the functionality of groovyBC (boundary conditions) and funkySetFields (set fields) (v2.3.0) prepend-path LD_LIBRARY_PATH /usr/local/swak4foam/2.3.0/lib prepend-path PATH /usr/local/swak4foam/2.3.0/bin prepend-path MANPATH /usr/local/swak4foam/2.3.0/man setenv GCONV_PATH /usr/lib64/gconv/ setenv SWAK4FOAM_SRC /usr/local/swak4foam/2.3.0/Libraries ------------------------------------------------------------------- So the installation seems to be complete. When I try to set up the path of the plug-in libs ( "libgroovyBC.so" ); I have a FOAM:WARNING --> FOAM Warning : From function dlOpen(const fileName&, const bool) in file POSIX.C at line 1179 dlopen error : libgroovyBC.so: cannot open shared object file: No such file or directory --> FOAM Warning : From function dlLibraryTable::open(const fileName&, const bool) in file db/dynamicLibrary/dlLibraryTable/dlLibraryTable.C at line 99 could not load "libgroovyBC.so" The foam warning doesn't stop the program as this isn't a fatal error. But I need to use this groovyBC for my boundary condition. My boundary condition is: upperWall { type groovyBC; value uniform (0 0 0); valueExpression "0.001*T-DT*fvc::snGrad(T)" } And as expected I now have a fatal error: --> FOAM FATAL IO ERROR: Unknown patchField type groovyBC for patch type patch Valid patchField types are :....... Do you have any idea how I can solve this problem? Why do I receive a foam warning for the .so file while swak4foam is apparently well installed. |
groovyBC or codedfixedValue
Hello Foamers,
I want to implement a boundary condition at electrode. N_P= K * Efield * N_P I am solving following equation with modified pisoFoam. (fvm::ddt(N_P)) + (fvm::div(phi+(K*Efield), N_P)) and for the electrode, I have to implent following BC, N_P = K * Efield * N_P. so my BC condition will change with every time step. In this equation N_P and Efield " need to be taken from electrode at previous time step and K is dimensionedScalar fix value 1. Should I have to used codedfixed BC or some other BC? I have also trying groovyBC but I am failed. is there anyone know how to implemrnt this BC? Thanks in advance. |
All times are GMT -4. The time now is 04:06. |