How to get the particle position from Barycentric coordinates?
Since version 5.0, Barycentric methods are used for tracking particles, which makes the solver more robust. But the results show the Barycentric coordinates instead of the position in the old version.
If I want the global coordinates, i.e., the real position of the particle, how do I process the tracking data? Thanks, Wu Yu |
you can do it as usual, by using position() instead of coordinates()
|
Yes, Guin,
It works very well. Thank you. Quote:
|
I wanna inject a particle to the numerical domain. I know the Cartesian position of the particle but the constructor of solidParticle class only accept the coordinate in barycentric coordinates how I can convert the Cartesian to barycentric.
|
hi,
where can I find the parcel coordinates() in global cartesian form? I'm running reactingParcelFoam in OF-Version 5.x (updated today) and in my folder "reactingCloud1Tracks" I only get a "positions" file and no "coordinates" file. The "positions" file only contains the parcel locations in barycentric form. I also tried placing InfoSwitches { ... // Write lagrangian "positions" file in v1706 format (at earlier) // if set to 1 writeLagrangianPositions 1; ... into my controlDict in /opt/openfoam5/etc/ but it didn't help. Any method to convert the barycentric coordinates to global cartesian would be appreciated as well. |
Quote:
I am quite new to OpenFoam and using sprayFoam right now. I searched a bit through the src or app, but I don't understand where exactly you need to change coordinates() to position() in order to get the cartesian coordinates of the particles. Can you help me? Thank you in advance! |
Quote:
Thank you in advance! |
hello,now i also have the same problems like you.Did you have some good ideas or have already solved it.
|
Hey,
I basically used paraview to convert and export the cartesian coordinates. Best Regards |
cartesian coordinates
Quote:
|
cartesian coordinates
Quote:
|
Basically you load the lagrangian data in paraview and save it again. The main steps are:
1.) Open ParaFoam, load lagrangian Cloud und choose all the parameters of the parcels you are interested in (diameter, temperature, coordinates, ...) 2.) Save as CSV (choose all timesteps, if you have some) You can now read the cartesian coordinates using another program, e.g. excel, matlab Of course you are able to script this process using e.g. python |
Quote:
1、I use oprnfoam5,in the lagrangianCloud ,only have a file named positions which used the barycenter coordinate system to record the position of particles; 2、When I save data as CSV,nothing for me to choose,because all of the files in lagrangianCloud are not used the type,I can't save any data. So do you have some good ideas or I misunderstood your steps,looking forward to hearing from you,thank you again! Sincerely say thank you! |
[QUOTE=upc_ngh;748914]First thank you very much for answering my question so detailed,but floow your steps,it can't work.Maybe I can't describe my question clearly:
1、I use oprnfoam5,in the lagrangianCloud ,only have a file named positions which used the barycenter coordinate system to record the position of particles; 2、When I save data as CSV,nothing for me to choose,because all of the files in lagrangianCloud are not used the type,I can't save any data. So do you have some good ideas or I misunderstood your steps,looking forward to hearing from you,thank you again! Of course I understand the overall problem as stated by your in your first point, that is the whole point of this discussion. Did you manage to open your OpenFOAM result in paraFoam? That should be straightforward: - open your .openFOAM result case (if you do not manage to open any result in paraview, create a new text-File with the ending ".openFOAM" in you case folder - this is just to tell paraview that i should expect OpenFOAM data.) - Before pressing "apply", tick under "sprayCloud" "langrangian" (if you do not want to load the continous phase untick "internalMesh") Afterwards save the .csv as described above. If it still doesnt work, please refer to the paraview userguide or another forum. |
[QUOTE=sprayFoamer;748915]
Quote:
|
All times are GMT -4. The time now is 15:56. |