|
[Sponsors] |
[swak4Foam] groovyBC in openFOAM-2.0 for parabolic velocity bc |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
March 27, 2012, 13:55 |
groovyBC in openFOAM-2.0 for parabolic velocity bc
|
#1 |
New Member
solOF
Join Date: Mar 2012
Posts: 26
Rep Power: 14 |
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 |
|
March 27, 2012, 15:41 |
|
#2 | |
Assistant Moderator
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51 |
Quote:
|
||
March 27, 2012, 19:39 |
|
#3 |
New Member
solOF
Join Date: Mar 2012
Posts: 26
Rep Power: 14 |
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 |
|
March 27, 2012, 20:32 |
|
#4 | |
Assistant Moderator
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51 |
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 |
||
March 28, 2012, 06:49 |
|
#5 |
New Member
solOF
Join Date: Mar 2012
Posts: 26
Rep Power: 14 |
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 |
|
March 28, 2012, 08:33 |
|
#6 |
New Member
solOF
Join Date: Mar 2012
Posts: 26
Rep Power: 14 |
Sorry, I forgot to add the error that I have when I'm running the case:
--> FOAM Warning : From function dlLibraryTable:pen(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 |
|
March 28, 2012, 08:53 |
|
#7 | |
Assistant Moderator
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51 |
Quote:
Have a look at the top of the page. There it says that support for this is discontinued with 2.0 |
||
March 28, 2012, 11:52 |
|
#8 |
New Member
solOF
Join Date: Mar 2012
Posts: 26
Rep Power: 14 |
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:pen(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 |
|
March 28, 2012, 17:56 |
|
#9 | ||||
Assistant Moderator
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51 |
Quote:
Quote:
The error messages you posted are not very helpful. What happens once g++ is called? Quote:
Quote:
|
|||||
March 29, 2012, 07:44 |
|
#10 |
New Member
solOF
Join Date: Mar 2012
Posts: 26
Rep Power: 14 |
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 |
|
March 31, 2012, 17:30 |
|
#11 | |
Assistant Moderator
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51 |
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) |
||
April 7, 2012, 11:42 |
|
#12 |
New Member
solOF
Join Date: Mar 2012
Posts: 26
Rep Power: 14 |
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 |
|
August 14, 2012, 09:34 |
|
#13 |
Senior Member
|
||
August 14, 2012, 11:13 |
|
#14 |
New Member
solOF
Join Date: Mar 2012
Posts: 26
Rep Power: 14 |
In the controlDict, where you call to your function, change the extension .so by .dylib, for example: forces.dylib
|
|
August 14, 2012, 11:28 |
|
#15 |
Senior Member
|
||
August 20, 2012, 17:52 |
|
#16 |
Assistant Moderator
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51 |
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
|
|
August 15, 2013, 09:41 |
|
#17 |
Member
Join Date: Feb 2012
Posts: 59
Rep Power: 14 |
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? |
|
August 15, 2013, 13:40 |
|
#18 | |
Assistant Moderator
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51 |
Quote:
__________________
Note: I don't use "Friend"-feature on this forum out of principle. Ah. And by the way: I'm not on Facebook either. So don't be offended if I don't accept your invitation/friend request |
||
August 23, 2013, 13:02 |
|
#19 | |
Senior Member
Illya Shevchuk
Join Date: Aug 2009
Location: Darmstadt, Germany
Posts: 176
Rep Power: 17 |
Hi Bernhard,
Quote:
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 - 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 Ilya |
||
August 23, 2013, 15:13 |
|
#20 | |
Assistant Moderator
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51 |
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
__________________
Note: I don't use "Friend"-feature on this forum out of principle. Ah. And by the way: I'm not on Facebook either. So don't be offended if I don't accept your invitation/friend request |
||
Tags |
boundary conditions, groovybc, velocity inlet |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Map of the OpenFOAM Forum - Understanding where to post your questions! | wyldckat | OpenFOAM | 10 | September 2, 2021 06:29 |
[swak4Foam] groovyBC in openFoam 230 | imani | OpenFOAM Community Contributions | 19 | April 6, 2015 08:25 |
[swak4Foam] Power law inlet velocity using groovyBC | aviator | OpenFOAM Community Contributions | 3 | November 13, 2013 11:50 |
[swak4Foam] Velocity waveform with groovyBC | bcgooder | OpenFOAM Community Contributions | 3 | December 5, 2012 14:45 |
Terrible Mistake In Fluid Dynamics History | Abhi | Main CFD Forum | 12 | July 8, 2002 10:11 |