|
[Sponsors] |
Sampling error "Attempt to return dictionary entry as a primitive" |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
February 24, 2021, 08:58 |
Sampling error "Attempt to return dictionary entry as a primitive"
|
#1 |
New Member
Richard Kelly
Join Date: Feb 2021
Posts: 10
Rep Power: 5 |
I am following the three week tutorial series for openfoam. I am a newbie to openFOAM and these forums so please be kind . I am running openFOAM8 on ubuntu 20.04. The tutorial I am following can be found here: https://www.cfd.at/downloads/FoamTut...leFourteen.pdf
Following the tutorial I get to page 7 where it askes me to run the following commands: >blockMesh >setFields >sonicFoam Instead of running sonicFoam I run rhoPimpleFoam as I am running openFOAM8 I get the following error: Code:
Here is what my controlDict looks like: Code:
/*--------------------------------*- C++ -*----------------------------------*\ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org \\ / A nd | Version: 8 \\/ M anipulation | \*---------------------------------------------------------------------------*/ FoamFile { version 2.0; format ascii; class dictionary; location "system"; object controlDict; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // application rhoPimpleFoam; startFrom startTime; startTime 0; stopAt endTime; endTime 0.007; deltaT 1e-05; writeControl runTime; writeInterval 0.001; purgeWrite 0; writeFormat ascii; writePrecision 6; writeCompression off; timeFormat general; timePrecision 6; runTimeModifiable true; functions { #includeFunc mag(U) linesample { type sets; functionObjectLibs ("libsampling.so"); writeControl timeStep; outputInterval 1; interpolationScheme cellPoint; setFormat raw; sets { data { type uniform; axis x; start (-4.995 0 0); end (4.995 0 0); nPoints 1000; } }; fields (T mag(U) p); } // * From the debugger it looks like there is an error in the data dict, but from reading the documentation I am inputting the right variables.... I think.. the only missing from the tutorial is points according to the documentation: https://www.openfoam.com/documentati...hp#x30-1331084 |
|
February 28, 2021, 11:59 |
|
#2 |
Senior Member
Mark Olesen
Join Date: Mar 2009
Location: https://olesenm.github.io/
Posts: 1,685
Rep Power: 40 |
I think you want "sets (..) ;" instead of "sets {...}".
Any particular reason you took the openfoam.org version instead of the openfoam.com one? |
|
March 1, 2021, 18:24 |
|
#3 |
New Member
Richard Kelly
Join Date: Feb 2021
Posts: 10
Rep Power: 5 |
Thanks for that! Foiled by a bracket once again!.
Only reason I took the "openfoam.org" version is that is what installed when I installed using apt-get on Ubuntu. I did not compile myself. Getting further along in the tutorials I am noticing I do not have cfmesh... wondering if that is a version thing or not. |
|
March 1, 2021, 18:53 |
|
#4 |
New Member
Richard Kelly
Join Date: Feb 2021
Posts: 10
Rep Power: 5 |
Install cfmesh after ...
|
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
No matching function error: Phase change source term added to interMixingFoam | wavefunction | OpenFOAM Programming & Development | 2 | February 4, 2022 07:46 |
[pimpleDyMFoam][dynamicMeshDict] "Attempt to return dictionary entry as a primitive" | Sorabh | OpenFOAM | 5 | July 19, 2019 06:57 |
Creating a new field from terms of the turbulence model | HaZe | OpenFOAM Programming & Development | 15 | November 24, 2014 13:51 |
Missing math.h header | Travis | FLUENT | 4 | January 15, 2009 11:48 |
Problem with rhoSimpleFoam | matteo_gautero | OpenFOAM Running, Solving & CFD | 0 | February 28, 2008 06:51 |