|
[Sponsors] |
April 29, 2013, 18:13 |
problem running potentialFoam
|
#1 |
New Member
sid
Join Date: Apr 2013
Posts: 6
Rep Power: 13 |
Hello everybody, it's my first time and i really need help to run potentialfoam with cylinder i've always got this following error:
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // Create time --> FOAM FATAL IO ERROR: "ill defined primitiveEntry starting at keyword 'const' on line 52 and ending at line 137" file: /home/sid-major/OpenFOAM/root-2.2.0/run/tutorials/basic/potentialFoam/cylinder/system/controlDict at line 137. From function primitiveEntry::readEntry(const dictionary&, Istream&) in file lnInclude/IOerror.C at line 132. FOAM exiting can someone help me please? |
|
April 29, 2013, 20:37 |
|
#2 |
Senior Member
|
As mentioned in the error message, the issue is likely to be in a keyword in the controlDict dictionary at line 137. Can you post the controlDict dictionary?
__________________
--- Julien de Charentenay |
|
April 30, 2013, 10:40 |
|
#3 |
New Member
sid
Join Date: Apr 2013
Posts: 6
Rep Power: 13 |
thank you for replying you can check the controldict
FoamFile { version 2.0; format ascii; class dictionary; location "system"; object controlDict; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // application potentialFoam; startFrom startTime; startTime 0; stopAt endTime; endTime 1; deltaT 0.001; writeControl timeStep; writeInterval 1; purgeWrite 0; writeFormat ascii; writePrecision 6; writeCompression off; timeFormat general; timePrecision 6; runTimeModifiable true; functions { // Lookup U Info<< "Looking up field U\n" << endl; const volVectorField& U = mesh().lookupObject<volVectorField>("U"); Info<< "Reading inlet velocity uInfX\n" << endl; scalar ULeft = 0.0; label leftI = mesh().boundaryMesh().findPatchID("left"); const fvPatchVectorField& fvp = U.boundaryField()[leftI]; if (fvp.size()) { ULeft = fvp[0].x(); } reduce(ULeft, maxOp<scalar>()); dimensionedScalar uInfX ( "uInfx", dimensionSet(0, 1, -1, 0, 0), ULeft ); Info << "U at inlet = " << uInfX.value() << " m/s" << endl; scalar magCylinder = 0.0; label cylI = mesh().boundaryMesh().findPatchID("cylinder"); const fvPatchVectorField& cylFvp = mesh().C().boundaryField()[cylI]; if (cylFvp.size()) { magCylinder = mag(cylFvp[0]); } reduce(magCylinder, maxOp<scalar>()); dimensionedScalar radius ( "radius", dimensionSet(0, 1, 0, 0, 0), magCylinder ); Info << "Cylinder radius = " << radius.value() << " m" << endl; volVectorField UA ( IOobject ( "UA", mesh().time().timeName(), U.mesh(), IOobject::NO_READ, IOobject::AUTO_WRITE ), U ); Info<< "\nEvaluating analytical solution" << endl; const volVectorField& centres = UA.mesh().C(); volScalarField magCentres(mag(centres)); volScalarField theta(acos((centres & vector(1,0,0))/magCentres)); volVectorField cs2theta ( cos(2*theta)*vector(1,0,0) + sin(2*theta)*vector(0,1,0) ); UA = uInfX*(dimensionedVector(vector(1,0,0)) - pow((radius/magCentres),2)*cs2theta); // Force writing of UA (since time has not changed) UA.write(); volScalarField error("error", mag(U-UA)/mag(UA)); Info<<"Writing relative error in U to " << error.objectPath() << endl; error.write(); #}; } } |
|
May 1, 2013, 03:51 |
|
#4 | |
Senior Member
|
Quote:
Do the following changes: Add these color lines at the beginning and bottom of your code as mentioned below: functions { functionObjectLibs ("libutilityFunctionObjects.so"); type coded; code #{ // Lookup U Info<< "Looking up field U\n" << endl; const volVectorField& U = mesh().lookupObject<volVectorField>("U"); ................. ................. #}; // } } Last edited by Tushar@cfd; May 1, 2013 at 06:19. |
||
May 1, 2013, 15:36 |
|
#5 |
New Member
sid
Join Date: Apr 2013
Posts: 6
Rep Power: 13 |
hello , sorry I tried as you said but it still does not work. I got this error when i tried to check the Mesh:
--> FOAM FATAL ERROR: Cannot find file "points" in directory "polyMesh" in times 0 down to constant From function Time::findInstance(const fileName&, const word&, const IOobject::readOption, const word&) in file db/Time/findInstance.C at line 203. |
|
May 2, 2013, 02:40 |
|
#6 | |
Senior Member
|
Quote:
and after that run the application potentialFoam.... The error you just mentioned above is of blockMesh, once you finish with generating mesh, it will go off. |
||
May 2, 2013, 14:08 |
|
#7 |
New Member
sid
Join Date: Apr 2013
Posts: 6
Rep Power: 13 |
I made no changes on it, after installing the software Openfoam, i wanted to start the solver with his own mesh but it doesn't works i don't know why. Can you check the blockmeshdict if there are some mistake please?
convertToMeters 1; vertices #codeStream { codeInclude #{ #include "pointField.H" #}; code #{ pointField points(19); points[0] = point(0.5, 0, -0.5); points[1] = point(1, 0, -0.5); points[2] = point(2, 0, -0.5); points[3] = point(2, 0.707107, -0.5); points[4] = point(0.707107, 0.707107, -0.5); points[5] = point(0.353553, 0.353553, -0.5); points[6] = point(2, 2, -0.5); points[7] = point(0.707107, 2, -0.5); points[8] = point(0, 2, -0.5); points[9] = point(0, 1, -0.5); points[10] = point(0, 0.5, -0.5); points[11] = point(-0.5, 0, -0.5); points[12] = point(-1, 0, -0.5); points[13] = point(-2, 0, -0.5); points[14] = point(-2, 0.707107, -0.5); points[15] = point(-0.707107, 0.707107, -0.5); points[16] = point(-0.353553, 0.353553, -0.5); points[17] = point(-2, 2, -0.5); points[18] = point(-0.707107, 2, -0.5); // Duplicate z points label sz = points.size(); points.setSize(2*sz); for (label i = 0; i < sz; i++) { const point& pt = points[i]; points[i+sz] = point(pt.x(), pt.y(), -pt.z()); } os << points; #}; }; blocks ( hex (5 4 9 10 24 23 28 29) (10 10 1) simpleGrading (1 1 1) hex (0 1 4 5 19 20 23 24) (10 10 1) simpleGrading (1 1 1) hex (1 2 3 4 20 21 22 23) (20 10 1) simpleGrading (1 1 1) hex (4 3 6 7 23 22 25 26) (20 20 1) simpleGrading (1 1 1) hex (9 4 7 8 28 23 26 27) (10 20 1) simpleGrading (1 1 1) hex (15 16 10 9 34 35 29 28) (10 10 1) simpleGrading (1 1 1) hex (12 11 16 15 31 30 35 34) (10 10 1) simpleGrading (1 1 1) hex (13 12 15 14 32 31 34 33) (20 10 1) simpleGrading (1 1 1) hex (14 15 18 17 33 34 37 36) (20 20 1) simpleGrading (1 1 1) hex (15 9 8 18 34 28 27 37) (10 20 1) simpleGrading (1 1 1) ); edges ( arc 0 5 (0.469846 0.17101 -0.5) arc 5 10 (0.17101 0.469846 -0.5) arc 1 4 (0.939693 0.34202 -0.5) arc 4 9 (0.34202 0.939693 -0.5) arc 19 24 (0.469846 0.17101 0.5) arc 24 29 (0.17101 0.469846 0.5) arc 20 23 (0.939693 0.34202 0.5) arc 23 28 (0.34202 0.939693 0.5) arc 11 16 (-0.469846 0.17101 -0.5) arc 16 10 (-0.17101 0.469846 -0.5) arc 12 15 (-0.939693 0.34202 -0.5) arc 15 9 (-0.34202 0.939693 -0.5) arc 30 35 (-0.469846 0.17101 0.5) arc 35 29 (-0.17101 0.469846 0.5) arc 31 34 (-0.939693 0.34202 0.5) arc 34 28 (-0.34202 0.939693 0.5) ); boundary ( down { type symmetryPlane; faces ( (0 1 20 19) (1 2 21 20) (12 11 30 31) (13 12 31 32) ); } right { type patch; faces ( (2 3 22 21) (3 6 25 22) ); } up { type symmetryPlane; faces ( (7 8 27 26) (6 7 26 25) (8 18 37 27) (18 17 36 37) ); } left { type patch; faces ( (14 13 32 33) (17 14 33 36) ); } cylinder { type symmetryPlane; faces ( (10 5 24 29) (5 0 19 24) (16 10 29 35) (11 16 35 30) ); } ); mergePatchPairs ( ); |
|
May 3, 2013, 03:46 |
|
#8 | |
Senior Member
|
Quote:
Have you checked your OpenFOAM installation properly? It seems, the main source of error. Well, you have put "root-2.2.0" name instead of "OpenFOAM-2.2.0" Recheck the path you have mentioned. Do check the following steps: execute the foamSystemCheck script in the bin/ directory to check your system: cd $HOME/OpenFOAM/OpenFOAM-2.2.0/bin/ ./foamSystemCheck Also execute following command: . $HOME/.bashrc For more information refer: http://www.openfoam.org/download/source.php |
||
May 3, 2013, 15:48 |
|
#9 |
New Member
sid
Join Date: Apr 2013
Posts: 6
Rep Power: 13 |
Ok i'll try it thank you so much for your help.
|
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Problem About Running Fluent In Linux | mitra | FLUENT | 18 | June 20, 2019 03:11 |
Parallel running of 3D multiphase turbulence model (unknown problem!!) | MOHAMMAD67 | OpenFOAM Running, Solving & CFD | 7 | November 23, 2015 11:53 |
Problem while running in Highperformance computing environment | Phanipavan | STAR-CD | 1 | September 11, 2013 07:42 |
running FLUENT on cluster problem | cth_yao | FLUENT | 2 | December 2, 2011 07:05 |
problem with running in parallel | dhruv | OpenFOAM | 3 | November 25, 2011 06:06 |