CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   FLUENT (https://www.cfd-online.com/Forums/fluent/)
-   -   import wall trap location of dpm into CFD-post (https://www.cfd-online.com/Forums/fluent/225798-import-wall-trap-location-dpm-into-cfd-post.html)

zog April 8, 2020 10:08

import wall trap location of dpm into CFD-post
 
I performed a DPM simulation in which I started to record the particles taht are trapped in a wall : report, sample, select the injection and the wall. It works wonders and I have now a huge file:
Code:

(wall_face 1)
(          x          y            z            u            v            w    diameter            t  parcel-mass        mass  n-in-parcel        time    flow-time)
((-1.3673e-02  8.8513e-02  9.3209e-02  3.1344e-02  -5.3337e-02  1.3182e-01  1.4242e-07  3.0000e+02  1.5127e-18  1.5127e-18  1.0000e+00  1.7250e-01  3.5416e-01) in0:105734)
((-1.3481e-02  8.8216e-02  9.2435e-02  -2.8814e-01  4.6485e-02  -4.1038e-01  2.4667e-07  3.0000e+02  7.8583e-18  7.8583e-18  1.0000e+00  1.8362e-01  3.5437e-01) in0:49977)
(.....)

Only thing is... I can't seem to either plot it in Fluent to then export (if i try to use it as input for injection it says 0 particles...) or to simply import it in CFDpost to plot it alongside the usual particles track.


I can use gnuplot or such to display it but I need to do the final postprocessing in CFDpost...



Any solution ? I tried to look for the required format to import raw x,y,z,data datafiles in cfd-post but... it doesn't seem to be any help on this on their manual.

vinerm April 8, 2020 10:19

DPM Output
 
CFDPost cannot read DPM output in this .dpm format. This is Fluent's injection file format. So, you can either load it as histogram or you can load it as a new injection and then just display the injection. To view it in CFDPost, it has to be written in xml format. That can be done from Fluent. However, I am not sure if you can do it for a transient case that has already been completed. You can try that though.

zog April 8, 2020 10:33

Quote:

Originally Posted by vinerm (Post 764748)
can load it as a new injection and then just display the injection


I tried that but it didn't want to inject any particles though. Do I need to put all velocities to 0 (since they probably intersect the walls due to being trapped trajectories) ?


I change wall DPM boundary to reflect, cleared all the particles, imported the outputed .dpm file in a new injection. Then tried one iteration with a very small time-step :
Injection-0: Out of 1 locations, 1 lost outside the domain in radial staggering; reducing staggering factor to 80% for them.

vinerm April 8, 2020 11:04

DPM File
 
Try writing xml based on DPM from Fluent.

For directly displaying using DPM, you may leave everything as it is, except change trap to reflect with very very small coefficients for normal. I have never tried it this way, it may or may not work.

zog April 8, 2020 14:23

Quote:

Originally Posted by vinerm (Post 764757)
Try writing xml based on DPM from Fluent.

For directly displaying using DPM, you may leave everything as it is, except change trap to reflect with very very small coefficients for normal. I have never tried it this way, it may or may not work.


The xml is empty, as the file input doesn't enable any particle release (either directly or running a single time step).


The wall boundary to reflect is what I treid but doesn't work either.

vinerm April 8, 2020 15:54

Xml
 
To write XML, you have to use dpm file as injection file. Standard injection that you used when you simulated the case will not work. So, you setup injection with dpm file for file injection, setup xml output during calculation, and run one time step or may be two without solving the flow, i.e., disable the flow calculation.

zog April 10, 2020 05:48

Quote:

Originally Posted by vinerm (Post 764807)
To write XML, you have to use dpm file as injection file. Standard injection that you used when you simulated the case will not work. So, you setup injection with dpm file for file injection, setup xml output during calculation, and run one time step or may be two without solving the flow, i.e., disable the flow calculation.


Sorry but either I don't understand what you advise me to try/do or you didn't understand what I did.


To summarize :

-I used standard injection to carry out my simulation, and while doing it I enabled "sample" in dpm reports, selecting my injection and the wall I need to monitor. This resulted in the file I put a sample in my first post. The file is .dpm but as far as I understand, it's the same format as the injeciton file I need (x y z u v w t etc...).
-I now want to display the locations of the trapped particles, that effectively hit the walls. I can do it by using gnuplot and plotting the .dpm file, but I need a way to do the same thing in cfdpost and/or Fluent.

-I therefore renamed the .dpm report of wall file into .inj. I cleared all injections in fluent, and I added a new one using the file option in the surface/group etc, then clicking file on the bottom and then ok, selecting the .inj file. No warning from fluent.


Now, no matter what I do (either run a few time steps directly, changing walls to reflect, disabling the flow in calculation, put all velocities to 0 to prevent them instantly being trapper or whatever in the wall etc, nothing happens: summarize tells me 0 parcels, 0 particles, and the console itself only write DPM iteration.... but no details.). I tried to export the dpm tracks via export menu (is it what you meant by xml ?) but file is blank.


From what I can see either the format is wrong (I also tried a simpler x y z u v w diameter temp mass-flow but didn't work either) or I don't "click" where needs to be.


Here is the sample of .dpm file I renamed .inj

Code:

(wall_face 1)
(          x          y            z            u            v            w    diameter            t  parcel-mass        mass  n-in-parcel          time    flow-time)
((-1.3673e-02  8.8513e-02  9.3209e-02  3.1344e-02  -5.3337e-02    1.3182e-01  1.4242e-07  3.0000e+02  1.5127e-18  1.5127e-18    1.0000e+00  1.7250e-01  3.5416e-01) in0:105734)
((-1.3481e-02  8.8216e-02  9.2435e-02  -2.8814e-01  4.6485e-02  -4.1038e-01  2.4667e-07  3.0000e+02  7.8583e-18  7.8583e-18    1.0000e+00  1.8362e-01  3.5437e-01) in0:49977)
(.....)


Here are examples of what I also tried :
Code:

(wall_face 1)
(          x          y            z            u            v            w    diameter            t  parcel-mass        mass  n-in-parcel          time    flow-time)
((-1.3673e-02  8.8513e-02  9.3209e-02  0.0  0.0        0.0  1.4242e-07  3.0000e+02  1.5127e-18  1.5127e-18    1.0000e+00  1.7250e-01  3.5416e-01) in0:105734)
((-1.3481e-02  8.8216e-02  9.2435e-02  0.0  0.0        0.0  2.4667e-07  3.0000e+02  7.8583e-18  7.8583e-18    1.0000e+00  1.8362e-01  3.5437e-01) in0:49977)
(.....)

Code:

(wall_face 1)
(          x          y            z            u            v            w    diameter            t            mass-flow)
((-1.3673e-02  8.8513e-02  9.3209e-02  0.0  0.0        0.0  1.4242e-07  3.0000e+02  1.5127e-11 ) in0:105734)
((-1.3481e-02  8.8216e-02  9.2435e-02  0.0  0.0        0.0  2.4667e-07  3.0000e+02  7.8583e-11 ) in0:49977)
(.....)

Would it be possible to detail a bit more the

procedure, from the example sample I posted above in .dpm file, to what the .injn should be and how to make it accounted for in Fluent ?


Also, I am a bit amazed that cfd-post cannot read simple xyz data format files... It's onnly a cloud of dots, right ? There must be a way to import it without weird shenannigans doing iterations without the flow or hacking the .inj file in fluent... Right ?

vinerm April 10, 2020 06:05

XML and Point Cloud
 
You did exactly what I suggested - use dpm as injection file (no need to change extension because extension doesn't have a meaning). Second step I mentioned was to write xml. However, there are few caveats. DPM file is written from a transient simulation, hence, it has a flow-time parameter. You have to change that so that the time is close to the current simulation time, certainly smaller but not larger the current simulation time in Fluent. If the objective is only to display particles, then you can setup a steady-state injection and remove the flow-time column entirely.

And if you don't want to use any other parameter, such as, particle velocity, then you can just modify the file to contain only coordinates, write it in csv format, and read it in CFDPost as point cloud. However, this will only be a point cloud, nothing else.

As far as displaying in Fluent is concerned, it cannot display trapped particles since those are removed. So, if you setup a new injection by using DPM file as injection file, then change the boundary condition for DPM to reflect.


All times are GMT -4. The time now is 19:23.