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

How to get the particle position from Barycentric coordinates?

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

Like Tree1Likes
  • 1 Post By sprayFoamer

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   August 15, 2017, 12:23
Default How to get the particle position from Barycentric coordinates?
  #1
New Member
 
wuyu
Join Date: Mar 2010
Posts: 27
Rep Power: 13
seasoul is on a distinguished road
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
seasoul is offline   Reply With Quote

Old   August 16, 2017, 02:19
Default
  #2
Member
 
Rodrigo
Join Date: Mar 2010
Posts: 92
Rep Power: 13
guin is on a distinguished road
you can do it as usual, by using position() instead of coordinates()
guin is offline   Reply With Quote

Old   August 16, 2017, 03:04
Default
  #3
New Member
 
wuyu
Join Date: Mar 2010
Posts: 27
Rep Power: 13
seasoul is on a distinguished road
Yes, Guin,

It works very well. Thank you.


Quote:
Originally Posted by guin View Post
you can do it as usual, by using position() instead of coordinates()
seasoul is offline   Reply With Quote

Old   September 5, 2017, 06:25
Default
  #4
New Member
 
sina
Join Date: Jul 2013
Posts: 19
Rep Power: 10
aghsin is on a distinguished road
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.
aghsin is offline   Reply With Quote

Old   March 5, 2018, 10:12
Default
  #5
New Member
 
Nils
Join Date: Mar 2018
Posts: 1
Rep Power: 0
foamy123 is on a distinguished road
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.
foamy123 is offline   Reply With Quote

Old   June 29, 2018, 08:27
Default
  #6
New Member
 
Join Date: Jun 2018
Posts: 5
Rep Power: 5
sprayFoamer is on a distinguished road
Quote:
Originally Posted by seasoul View Post
Yes, Guin,

It works very well. Thank you.

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!
sprayFoamer is offline   Reply With Quote

Old   July 6, 2018, 04:28
Default
  #7
New Member
 
Join Date: Jun 2018
Posts: 5
Rep Power: 5
sprayFoamer is on a distinguished road
Quote:
Originally Posted by guin View Post
you can do it as usual, by using position() instead of coordinates()
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 parcels. Can you help me?

Thank you in advance!
Stanislav likes this.
sprayFoamer is offline   Reply With Quote

Old   November 3, 2019, 04:28
Default
  #8
New Member
 
xiangliu
Join Date: Sep 2019
Posts: 6
Rep Power: 3
upc_ngh is on a distinguished road
hello,now i also have the same problems like you.Did you have some good ideas or have already solved it.
upc_ngh is offline   Reply With Quote

Old   November 4, 2019, 02:59
Default
  #9
New Member
 
Join Date: Jun 2018
Posts: 5
Rep Power: 5
sprayFoamer is on a distinguished road
Hey,
I basically used paraview to convert and export the cartesian coordinates.
Best Regards
sprayFoamer is offline   Reply With Quote

Old   November 4, 2019, 03:23
Default cartesian coordinates
  #10
New Member
 
xiangliu
Join Date: Sep 2019
Posts: 6
Rep Power: 3
upc_ngh is on a distinguished road
Quote:
Originally Posted by sprayFoamer View Post
Hey,
I basically used paraview to convert and export the cartesian coordinates.
Best Regards
hey,thanks for answering me!Now,I am a newer of paraview.can you tell me more detailed?I Thank you very much!!!
upc_ngh is offline   Reply With Quote

Old   November 4, 2019, 03:31
Default cartesian coordinates
  #11
New Member
 
xiangliu
Join Date: Sep 2019
Posts: 6
Rep Power: 3
upc_ngh is on a distinguished road
Quote:
Originally Posted by sprayFoamer View Post
Hey,
I basically used paraview to convert and export the cartesian coordinates.
Best Regards
can you help me? I am very urgent for this.Can the paraview convert the data to cartesian coordinates?Thank you very much!!!
upc_ngh is offline   Reply With Quote

Old   November 5, 2019, 01:41
Default
  #12
New Member
 
Join Date: Jun 2018
Posts: 5
Rep Power: 5
sprayFoamer is on a distinguished road
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
sprayFoamer is offline   Reply With Quote

Old   November 5, 2019, 02:52
Default
  #13
New Member
 
xiangliu
Join Date: Sep 2019
Posts: 6
Rep Power: 3
upc_ngh is on a distinguished road
Quote:
Originally Posted by sprayFoamer View Post
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
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!


Sincerely say thank you!
upc_ngh is offline   Reply With Quote

Old   November 5, 2019, 03:08
Default
  #14
New Member
 
Join Date: Jun 2018
Posts: 5
Rep Power: 5
sprayFoamer is on a distinguished road
[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.
sprayFoamer is offline   Reply With Quote

Old   November 5, 2019, 03:22
Default
  #15
New Member
 
xiangliu
Join Date: Sep 2019
Posts: 6
Rep Power: 3
upc_ngh is on a distinguished road
[QUOTE=sprayFoamer;748915]
Quote:
Originally Posted by upc_ngh View Post
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.
Thank you very much. I used the "paraFoam &" to open the case in bluecfd5.x,also I floow you steps , but I can't save any data as CSV
upc_ngh is offline   Reply With Quote

Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
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 Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
UDF for particle interception with pt_termination fortran routine abcdefgh CFX 6 October 6, 2019 13:30
Particle tracking error alchem OpenFOAM Bugs 5 May 6, 2017 16:30
injection problem Mark New FLUENT 0 August 4, 2013 01:30
Force dependent on particle position jranita OpenFOAM Programming & Development 1 August 23, 2011 19:44
DPM UDF particle position using the macro P_POS(p)[i] dm2747 FLUENT 0 April 17, 2009 01:29


All times are GMT -4. The time now is 06:53.