|
[Sponsors] |
#codeStram error: ill defined primitiveEntry starting at keyword 'internalField' |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
March 6, 2024, 21:39 |
#codeStram error: ill defined primitiveEntry starting at keyword 'internalField'
|
#1 |
New Member
chenxingyu
Join Date: Mar 2024
Posts: 2
Rep Power: 0 |
hello,
I am extremely new to OpenFOAM, I'm trying to make a simulation of Spinodal decomposition of Benchmark with OpenFoam.I use #codeStream to write the initial conditions under 0 files. This is my codes: /*--------------------------------*- C++ -*----------------------------------*\ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org \\ / A nd | Version: 9 \\/ M anipulation | \*---------------------------------------------------------------------------*/ FoamFile { format ascii; class volScalarField; object c; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // dimensions [0 0 0 0 0 0 0]; internalField #codeStream { codeInclude #{ #include "fvCFD.H" #}; codeOptions #{ -I$(LIB_SRC)/finiteVolume/lnInclude \ -I$(LIB_SRC)/meshTools/lnInclude #}; codeLibs #{ -lmeshTools \ -lfiniteVolume #}; code #{ const IOdictionary& d = static_cast<const IOdictionary&>(dict); const fvMesh& mesh = refCast<const fvMesh>(d.db()); const scalar c_0=0.5; const scalar epsilon=0.01; scalarField c(mesh.nCells(),0.); forAll(c,i) { scalar x = mesh.C()[i][0]; scalar y = mesh.C()[i][1]; c[i] = c_0 + epsilon * ( cos(0.105 * x) * cos(0.11 * y) + pow(cos(0.13 * x) * cos(0.087 * y), 2) + cos(0.025 * x - 0.15 * y) * cos(0.07 * x - 0.02 * y)); } #}; } boundaryField { bottom { type zeroGradient; } top { type zeroGradient; } left { type zeroGradient; } right { type zeroGradient; } frontAndBack { type empty; } } // ************************************************** *********************** // When i run my case my terminal gives: FOAM FATAL IO ERROR: "ill defined primitiveEntry starting at keyword 'internalField' on line 18 and ending at line 88" file: /home/cxy/OpenFOAM/cxy-9/run/Benchmark/cavity/0/c at line 88. I checked multiple times but i don't find anything wrong and also my file is 84 lines long. Please, help me to figure out this. Many thanks. Last edited by leoncly; March 7, 2024 at 00:08. |
|
Tags |
#codestream, internalfileds |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
big difference between clockTime and executionTime | LM4112 | OpenFOAM Running, Solving & CFD | 21 | February 15, 2019 03:05 |
[blockMesh] "ill defined primitiveEntry starting at keyword Boundary ..... | Punt3r | OpenFOAM Meshing & Mesh Conversion | 3 | June 12, 2016 09:16 |
icoFoam: ill defined primitiveEntry starting at Keyword 'value' | sinatahmooresi | OpenFOAM Running, Solving & CFD | 4 | December 20, 2015 14:14 |
[blockMesh] Can't find my mistake blockMeshDict | jelzinga | OpenFOAM Meshing & Mesh Conversion | 8 | March 19, 2015 01:08 |
[OpenFOAM] paraview/paraFoam crash "ill defined primitiveEntry" | psosnows | ParaView | 4 | June 22, 2012 03:20 |