CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   FLUENT (https://www.cfd-online.com/Forums/fluent/)
-   -   Using file to define injection distribution!!(DPM) (https://www.cfd-online.com/Forums/fluent/31408-using-file-define-injection-distribution-dpm.html)

nkme2007 October 10, 2012 05:47

Hello All,

I want to do analysis of heat transfer from water flowing through pipes submerged inside concrete. I am modelling in GAMBIT and wish to analyse it on Ansys FLUENT.

Can anybody help me out, how to model and simulate?

Does any tutorials exist?

VictorLP April 27, 2013 12:46

Hello. I cannot create valid injection definition file.
May somebody send me some valid file?

Thanks in advance, Victor.

p.s: my e-mail: 1205blp@gmail.com

cantonuc May 29, 2013 15:44

Hi, I need to generate the archive .inj to make an injection for a fluent model, but I don't know where to find the C routine to make this, can someone help me with this?? thanks a lot, and the other question is if this kind of archive can be used when the geometry is cylindrical or if I must to transform the coordinates to use it,

Please I need to make this step to start my model

Thanks a lot

Cristian

marcoscp2 May 22, 2014 13:40

What about the time?
 
I don't understand how can I set up in the software the time of each injection.

For example, I want my first injection to begin at 30 s, my second injection needs to begin at 45 s and my final one at 60 s.

Does it mean that I have to create three injections and set in the software boxes for start and stop time manually?

VictorLP May 22, 2014 14:19

Quote:

Originally Posted by marcoscp2 (Post 493669)
I don't understand how can I set up in the software the time of each injection.

For example, I want my first injection to begin at 30 s, my second injection needs to begin at 45 s and my final one at 60 s.

Does it mean that I have to create three injections and set in the software boxes for start and stop time manually?

Why not? I think it is the best decision. Bisides if you will do such you will can track, get summuries and time statstics etc. for each injections separately.

Alternative is use injection profile with zero parametres such as velocity, flow rate, diameter etc. between injections. I think it is not good.

I also did injection of my second portion just by manual changing settings of injection-0. example: first injection start time 1ms stop time 2ms, second injection start time 2.1ms stop time 3.1ms. I calculated until 2.1ms with settings start time 1ms stop time 2ms, then changed to start time 2.1ms stop time 3.1ms and continued. Keep attention to your velosity and massflow profiles for right time coordinate.

marcoscp2 May 22, 2014 14:31

Quote:

Originally Posted by VictorLP (Post 493676)
Why not? I think it is the best decision. Bisides if you will do such you will can track, get summuries and time statstics etc. for each injections separately.

Alternative is use injection profile with zero parametres such as velocity, flow rate, diameter etc. between injections. I think it is not good.

I also did injection of my second portion just by manual changing settings of injection-0. example: first injection start time 1ms stop time 2ms, second injection start time 2.1ms stop time 3.1ms. I calculated until 2.1ms with settings start time 1ms stop time 2ms, then changed to start time 2.1ms stop time 3.1ms and continued. Keep attention to your velosity and massflow profiles for right time coordinate.

I undestand. But I don't think that is viable for a lot of injections. Let me explain better my problem so you can say if you agree with me.

I need 30 points of injection. Each point has to release particles with different diameters at different times in a random fashion (time and diameter). I'll need to set the start and stop times manually? That seems counterproductive to me. Even more if I think that later on I will have to create more points.

If you have any suggestions, please let me know. It will be much appreciated.

VictorLP May 22, 2014 16:02

Quote:

Originally Posted by marcoscp2 (Post 493678)
I undestand. But I don't think that is viable for a lot of injections. Let me explain better my problem so you can say if you agree with me.

I need 30 points of injection. Each point has to release particles with different diameters at different times in a random fashion (time and diameter). I'll need to set the start and stop times manually? That seems counterproductive to me. Even more if I think that later on I will have to create more points.

If you have any suggestions, please let me know. It will be much appreciated.

In this case I think you should use the number of injections equal number of position and create for each position velocity and massflow profile, that will contain zeros between injections period. Fluent deleting the particles with mass less than some limit.

Or you can use "file injection" and create number of injections equal to number of time periods injections. different locations and diameters will be included in injection file. For example: injection-0 duration from 30s to 39s, in injection file will be included 30 locations with different diameters and velosities and massflows. injection-1 duration from 40s to 49s with locations, velosities and massflows etc for new 30 point that included in injection file.

marcoscp2 May 22, 2014 16:11

I see.

But I still have to set the time manually for each one of the injections, right?

Thanks again for the help.

VictorLP May 23, 2014 03:23

Quote:

Originally Posted by marcoscp2 (Post 493688)
I see.

But I still have to set the time manually for each one of the injections, right?

Thanks again for the help.

In the case of second variant you can create previously all number of time intervals in corresponding number of injections.

I think you'd like to create injection file with time dependance, but i dont know whether it is possible. I wanted to do such for my calculations, but i could not do it. It was necessary for me to create 1 injection with diameter dependent on time. I couldnot find the solution of this.

roopesh99 July 22, 2014 10:09

injection file
 
Hi friends, i need your guidance to understand the injection file. My geometry is 3D (10cmX10cmX60cm) and i want to fill 1mm particle up to 21 cm height. But i am unable to understand how to decide about x,y ad z coordinate for making injection file. Also vx,,vy and vz are zero then how we calculate mass flow rate my particle density is 2500kg/cm3.Can any one sent me method or link to write injection file. i mean method for ((x y z u v w diameter temperature mass-flow) name )
my email roopesh99@gmail.com

roopesh99 July 25, 2014 10:38

Can anyone sand or explain about the method for writing injection file in the following format.
((x y z u v w diameter temperature mass-flow) name )
my email: roopesh99@gmail.com

sescobar July 25, 2014 13:31

Take a look at this previous thread.

http://www.cfd-online.com/Forums/flu...ution-dpm.html

roopesh99 July 27, 2014 23:35

injection file
 
Thanks for reply, I saw this ((x y z u v w diameter temperature mass-flow) name ), but I am unable to understand abt the mass flow rate of which they are trying to write, i mean method for calculating it for injection file. Also method for arranging the particle, Is it side by side.

Shaheer July 24, 2015 05:59

Hello i have coordinates of multiple particles with their x y z coordinate radius and temperature(they are supposed to be stationary so no mass flow there). I need to input them in a geometry. I am using Ansys 15 at the moment and i was told i could import them as point by the create opition. However there is no temperature there and its not working since the file i have is in excell format and i dont think it can read it very well.
Some help in this would be highly appreciated. I am new in fluent i started working on it last week so a bit basic explanation would be appreciated even more.

ghost82 July 24, 2015 08:27

Hi Shaheer,
as I wrote in the other post, you can create an injection file to load your volume.

The injection file must have this format (check in fluent guide!!):
(( x y z U V W particleDia particleTemperature massFlow) injection:0)

x: x coordinate in m
y: y coordinate in m
z: z coordinate in m
U: x velocity in m/s
V: y velocity in m/s
W: z velocity in m/s
particleDIA: particle diameter in m
particleTemperature: particle temperature in K
massFlow: particle mass flow in kg/s
injection:0 --> name of the injection

Now, you have an excel file, not formatted as you want: all you have to do is to automatically format your excel data into a new injection file, so it can be read in fluent. You can program in visual basic, or what you want, or this can be easily done in excel itself.

For example, you have in your excel file, in sheet1:

Column A: x coordinate in m
Column B: y coordinate in m
Column C: z coordinate in m
Column D: temperature in K

Column E (create it): progressive numbers starting from 0, step +1 (so you have E1=0, E2=1, E3=2 and so on).

All your particles have 1 mm diameter.
You set a time step for the transient simulation of 0,01 s.
You set end time of injection at 0,01 s.
Your particles have a density of 1500 kg/m3.

In another sheet of excel you can write in A1 cell:
Take cell values from sheet1
Code:

="(( " & A1 & " " & B1 & " " & C1 & " " & "0.0 " & "0.0 " & "0.0 " & "0.001 " & D1 & " " & "0.00007854) " & "injection:" & E1 & ")"
Value of 0.00007854 is derived by:
you have a particle with a volume of 5.24e-10 m3.
Your particle has mass of 7.85e-7 kg
You inject your particle during 0.01 s, from time 0 s to 0.01 s (time step 0.01 s): you are injecting at 0 m/s velocity your particle once (i.e.: you are loading your volume only at the first time step).
0.00007854 = 7.85e-7 / 0.01

Now you have the first string for your first particle.
Now drag down that cell to aoutomatically complete all the remaining strings for all your particles.

Once finished, copy your new sheet2 into a txt file and rename it.

NB: before all, try to inject a single particle to see if it works and check carefully in fluent user guide format of the injection file.

Daniele

Shaheer July 24, 2015 10:25

Thank you very much for taking your time on this one.

Shaheer July 30, 2015 10:00

Hi I did as you said and formed the script using excel in txt file it looks like this
(( -0,98748 -0,00978254 -0,0349822 0 0 0 0.001 773,099 0.00007854) injection:0)(( -0,850535 -0,00640727 -0,0349854 0 0 0 0.001 770,736 0.00007854) injection:1)(( -0,855105 -0,00489111 -0,0353856 0 0 0 0.001 771,4 0.00007854) injection:2)(( -1,03791 -0,0109162 -0,0338131 0 0 0 0.001 772,951 0.00007854) injection:3)

I just tried it for one particle ie made it to .inj with only one particle data and i am getting the following message when i try to see the list
''Particle streams from injection-0:
STREAM ...........................INITIAL VALUES...........................
NO TYP (X) (Y) (Z) (U) (V) (W) (T) (DIAM) (MFLOW)
1 particles not found in injection injection-0


Particle streams from injection-0:
STREAM ...........................INITIAL VALUES...........................
NO TYP (X) (Y) (Z) (U) (V) (W) (T) (DIAM) (MFLOW)
''

Is there a problem with the format or anything?

ghost82 July 30, 2015 11:26

1 Attachment(s)
Hi Shaheer,
see attached file (extract from zip) I tested on a test case.
The file must be formatted as the attached one, including first line.

In the file I'm injecting 2 particles.

You need to code in excel several strings to reproduce each line, for each particle, then copy to a txt file and finally rename it.

PS: I'm going on holidays now and I will be out for some time. Happy summer to all!

ghost82 July 31, 2015 11:32

Remember that in fluent decimal separator is point, so you may need to do a find and replace all commas with points.

Shaheer August 5, 2015 05:13

I really think there should be a tutorial for these things you know!
I tried to access my files with the format but no avail.
I tried to fit in your file and mine but sth didnt click so instead of create injection i read the injections and well in both case it seems i am getting this
//rror: CAR: invalid argument [1]: wrong type [not a pair]
Error Object: name
Importing the following injections:

Error: CAR: invalid argument [1]: wrong type [not a pair]
Error Object: name//

Do you face the same issue ever?


All times are GMT -4. The time now is 09:38.