CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM

solidCylinder (solidParticle) positions error

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Display Modes
Old   October 20, 2017, 18:50
Default solidCylinder (solidParticle) positions error
  #1
Member
 
Joaquín Neira
Join Date: Oct 2017
Posts: 31
Rep Power: 3
cojua8 is on a distinguished road
Hello,

I am a new OpenFOAM user (and new in the forums) with almost zero experience in C++ coding.

I've been trying to run a solver based on particle tracking SolidCylinderFoam (wirtten by Jelena Andric in OF1.5), which uses a new class called solidCylinder and solidCylinderCloud that are the same as solidParticle and solidParticleCloud, but with a very small change (no properties are changed).
I had some issues to make it work on OF5.0 but finally it compiled without problems.



Now, the problem comes when I run the test case, which should track 2 particles:

Code:
Create time

Create mesh for time = 0

Reading field U

Reading field rho

Reading field nu


Reading environmentalProperties

Creating particle cloud

--> FOAM FATAL IO ERROR: 
wrong token type - expected Scalar, found on line 19 the punctuation token ')'

file: /home/usuario4/Joaquin/OpenFOAM/OpenFOAM-5.0/solidParticleFoam/box/0/lagrangian/defaultCloud/positions at line 19.

    From function Foam::Istream& Foam::operator>>(Foam::Istream&, Foam::doubleScalar&)
    in file lnInclude/Scalar.C at line 93.

FOAM exiting
The file 0/lagrangian/defaultCloud/positions:

Code:
/*--------------------------------*- C++ -*----------------------------------*\
| =========                 |                                                 |
| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
|  \\    /   O peration     | Version:  1.5.x                                 |
|   \\  /    A nd           | Web:      http://www.OpenFOAM.org               |
|    \\/     M anipulation  |                                                 |
\*---------------------------------------------------------------------------*/
FoamFile
{
    version     2.0;
    format      ascii;
    class       Cloud<solidCylinder>;
    location    "0";
    object      positions;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
2
(
(1e-2 9e-2 0.05 )  0
(2e-2 9e-2 0.05 )  0
)
// ************************************************************************* //
0/lagrangian/defaultCloud/d (diameter)

Code:
2
(
2.0e-3
2.0e-3
)
and 0/lagrangian/defaultCloud/U (velocity)
Code:
2
(
(1.7e-1 0 0)
(1.7 0 0)
)
and in /constant i have the file particleProperties (and nothing else related to particles)

Code:
rhop rhop [ 1 -3  0  0  0  0  0] 1000;
e    e    [ 0  0  0  0  0  0  0] 0.8;
mu   mu   [ 0  0  0  0  0  0  0] 0.2;
how do I solve this error?

Thanks in advance
cojua8 is offline   Reply With Quote

Old   October 23, 2018, 03:35
Default [solidParticleInterFoam] solidParticleDamBreak positions error
  #2
New Member
 
Ludo Masci
Join Date: Oct 2018
Posts: 2
Rep Power: 0
lumasci is on a distinguished road
Hi Joaquim,

I found the same error trying to implement a lagrangian part into the interFoam solver.

I haven't solved the issue yet. Could you please keep posted if you found solutions?

Here is the log file I got.
Code:
Create time
Create mesh for time = 0

PIMPLE: Operating solver in PISO mode
Reading field p_rgh
Reading field U
Reading/calculating face flux field phi
Reading transportProperties
Selecting incompressible transport model Newtonian
Selecting incompressible transport model Newtonian
Selecting turbulence model type RAS
Selecting RAS turbulence model kEpsilon
RAS
{
    RASModel        kEpsilon;
    turbulence      on;
    printCoeffs     on;
    Cmu             0.09;
    C1              1.44;
    C2              1.92;
    C3              0;
    sigmak          1;
    sigmaEps        1.3;
}

Reading g
Reading hRef
Calculating field g.h
No MRF models present
No finite volume options present
DICPCG:  Solving for pcorr, Initial residual = 0, Final residual = 0, No Iterations 0
time step continuity errors : sum local = 0, global = 0, cumulative = 0
Courant Number mean: 0 max: 0

--> FOAM FATAL IO ERROR: 
wrong token type - expected Scalar, found on line 20 the punctuation token ')'
file: /home/jlh/OpenFOAM/jlh-5.0/run/solidParticleDamBreak/0/lagrangian/defaultCloud/positions at line 20.
    From function Foam::Istream& Foam::operator>>(Foam::Istream&, Foam::doubleScalar&)
    in file lnInclude/Scalar.C at line 93.
FOAM exiting
Thanks,

Last edited by lumasci; October 23, 2018 at 03:39. Reason: mistakenly validated the post
lumasci is offline   Reply With Quote

Old   October 23, 2018, 09:00
Default
  #3
Member
 
Vince
Join Date: Mar 2017
Posts: 30
Rep Power: 3
hyFoam is on a distinguished road
Hi,


I have never used these solvers but I bet this has to do with barycentric tracking introduced in OF-5:
https://cfd.direct/openfoam/free-sof...tric-tracking/


The input file to locate the different particles will necessarily differ from older OF versions, thus the error. You could browse through older posts dealing with barycentric tracking for more details.



Thanks,
Vincent
hyFoam is offline   Reply With Quote

Old   November 7, 2018, 12:09
Default test case barycentric tracking - particle in Eulerian
  #4
New Member
 
Ludo Masci
Join Date: Oct 2018
Posts: 2
Rep Power: 0
lumasci is on a distinguished road
Hi,

Thanks for the reply. I understand better why the command "position" can't work now anymore.

I didn't manage to solve my issue, though. Having a test case would help visualize how to implement this "new" tracking function.

Is someone aware of an existing test case using the barycentric function? (Even better as a tutorial.)
My aim to add particles to an Eulerian phase.

Thanks.
Ludo
lumasci is offline   Reply With Quote

Reply

Tags
error, positions, solidcylinder, solidparticle, solidparticlecloud

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
blockMesh with double grading. spwater OpenFOAM Native Meshers: blockMesh 89 July 24, 2018 17:48
Native ParaView Reader Bugs tj22 OpenFOAM Paraview & paraFoam 270 January 4, 2016 12:39
Compile problem ivanyao OpenFOAM Running, Solving & CFD 1 October 12, 2012 10:31
Ansys Fluent 13.0 UDF compilation problem in Window XP (32 bit) Yogini Fluent UDF and Scheme Programming 7 October 3, 2012 08:24
Compiling problems with hello worldC fw407 OpenFOAM Installation 21 January 6, 2008 18:38


All times are GMT -4. The time now is 22:08.