CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Running, Solving & CFD (https://www.cfd-online.com/Forums/openfoam-solving/)
-   -   positions file on the latest version of openfoam (https://www.cfd-online.com/Forums/openfoam-solving/221700-positions-file-latest-version-openfoam.html)

KTG October 25, 2019 20:22

positions file on the latest version of openfoam
 
Hi all,


I am trying to recreate the solidParticle example from here: https://pingpong.chalmers.se/public/...lication-2.pdf


on openFoam v7. I was able to create the solver in the tutorial and compile it without any errors, but unless I am mistaken there is a problem with positions file format:




Code:

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

file: /run/media/abe/spindisk/Simulations/interTrashFoam/damBreak/0/lagrangian/defaultCloud/positions at line 19.

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


I can only get the solver to run with zero particles. The positions of the two particles are:


Code:

2
(
(2e-2 0.58 0.005) -1
(3e-2 0.58 0.005) -1
)


I have been digging around in the source code all day and can't seem to find where things are read in. The tutorials only contain kinematic particles, where positions are stored in /constant. Any ideas?


Thanks

KTG October 28, 2019 12:10

Maybe I should have asked an alternate question that would also solve this problem. Can anyone explain to me how to find in the deoxygen code where where that file is read in, or what format it should be? I am not a great C++ programmer, and can't seem to figure it out.


Thanks

giando December 2, 2021 11:19

Any news on this? I am experiencing the same problem.

KTG December 2, 2021 14:26

Hey,


I never figured out what the issue was, but ended up not needing it. Depending on what your are doing, you might find this function object tutorial useful:


https://www.cemf.ir/residence-time-d...ticle-tracing/


It was suggested by someone in another thread I posted and worked well for what I needed. I think there are multiple particle classes, but it seems like the more complex ones can be made into passive tracers with the right settings when running the solver. So if you really need to program something into a solver, I would look at the Lagrangian particle solvers and try grabbing code out of there. That's just an idea though - like I said, I was never successful with that code. Maybe someone with more experience can weigh in...

giando December 3, 2021 11:44

Thanks for the reply and the link! I will look into it and see what I can do.


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