Using file to define injection distribution!!(DPM)
Hello,
In fluent DPM, particle initial conditions can be read from an external file. The file has following form: ((x y z u v w diameter temperature mass-flow) name ) But what's the file's format?? Thank you for your help!! winnie |
Re: Using file to define injection distribution!!(
Hi wiinie
The file has the format that you write ((x y z u v w diameter temperature mass-flow) injection0:ID ) ((# # # # # # # # # # #) injection0:0 ) ((# # # # # # # # # # #) injection0:1 ) ((# # # # # # # # # # #) injection0:2 ) ... ... ... ((# # # # # # # # # # #) injection0:n ) where # is a number under the unit that you are using. Regards Alex Munoz |
Re: Using file to define injection distribution!!(
Hi, Alex Munoz
Thank you for your answer. I would also like to know the file's type, another word, what kind of files can be accessed by fluent? I have tried .txt, .c and so on, but they can't be input to the fluent. Waiting for your answer! By the way, if I have four injections, can I use four single injections? Does it have any difference with a file injection? Regards winnie |
Re: Using file to define injection distribution!!(
Hi winnie
The file is a text file, For instance I generate a file using a C code that I wrote, then I name it "bach.inj" YOu can create four files or I guess you can write just one file containing 4 injection like this {{ }injection0:1} ... ... {{ }injection1:1} ... ... {{ }injection2:1} ... ... {{ }injection3:1} ... Regards Alex Munoz |
Re: Using file to define injection distribution!!(
Hi, Alex
I still can't import the file to the fluent. It really confused me! My procedure is firstly, I create my file using C code as follows: {{-0.0087 0.0 0.0 0.0 0.0082 0.0 0.003 20.0 0.000006554} injection0:1} {{-0.0029 0.0 0.0 0.0 0.0082 0.0 0.003 20.0 0.000006554} injection1:1} {{0.0029 0.0 0.0 0.0 0.0082 0.0 0.003 20.0 0.000006554} injection2:1} {{0.0087 0.0 0.0 0.0 0.0082 0.0 0.003 20.0 0.000006554} injection3:1} then, I save it as 'initial.inj' next, in fluent 'set injection properties' panel, I choose file as injection type and after put down the botton 'file...'at the bottom, I can find 'initial inj'file in dialog box, I choose it. finally, I go back to 'injections'panel, choose the injection which is defined by the file, and put down the 'list' botton, then in fluent console window, there are following messages : Number of injections read in=0 Particle streams from injection-0: STREAM ...........................INITIAL VALUES........................... NO TYP (X) (Y) (Z) (U) (V) (W) (T) (DIAM) (MFLOW) It seems the injection failed. What's the matter? Sorry to bother you so many times! But your help is really valuable for me ! Regards winnie |
Re: Using file to define injection distribution!!(
Hi
You forgot to put and initial text like this {X Y Z U V W Diameter Temperature mass-flow}injection:ID name} In addition, you need to put a end of the line at the end of each data row let me send you and example of my file and you see for yourself(I send the file to your e-mail adddress due to confidential issues)also you should locate your initial.inj in the directory that you launch fluent Regards Alex Munoz |
Re: Using file to define injection distribution!!(
Hi winnie
I apologize for confuse the braquet that you should use for your injection file, intead of {} use (). the format is (X Y Z U V W Dameter Temp Mas Flow name) (# # # # # # # # #)injection0:1) I am so sorry for the confusion. Regards Alex Munoz |
Re: Using file to define injection distribution!!(
Hi, Alex
What I can say now is only thanks! Thank you for your kindly and valuable help!! Regards winnie |
Re: Using file to define injection distribution!!(
Hi, Alex
I am so sorry that I have to bother you once again. I followed all you have told me and after importing the initial.inj file to fluent, I list the injection and the message in the fluent console window is: Error: FLUENT received fatal signal (ACCESS_VIOLATION) 1. Note exact events leading to error. 2. Save case/data under new name. 3. Exit program and restart to continue. 4. Report error to your distributor. Error Object: () when I list the injection once again, the message in the fluent console window is: Particle streams from injection-0: STREAM ...........................INITIAL VALUES........................... NO TYP (X) (Y) (Z) (U) (V) (W) (T) (DIAM) (MFLOW) 171977144 IN -8.70e-03 0.00e+00 0.00e+00 0.00e+00 8.20e-03 0.00e+00 2.00e+01 3.00e-03 6.55e-06 0 IN -2.90e-03 0.00e+00 0.00e+00 0.00e+00 8.20e-03 0.00e+00 2.00e+01 3.00e-03 6.55e-06 It seems that fluent has catched two injections, but where are the other two? Then I copied the case you give to me and the result is the former. I am so tired that I neally want to give it up. Maybe I still neglect something? By the way, the .inj file should be saved in the same directory as the case file, yes? Anyway, I really appreciate your kindly help!Thank you. Regards winnie |
Re: Using file to define injection distribution!!(
Hi Winnie
Do not quit! Do not get emotionally involve with your project! I can guess what's going on! The access violation means that you have not follow a logic secuences of events for your calculation. I will tell you how I run my particle tracking with an injection file readed from my directory file 1) put the injection file "initial.inj" in the directory that you have the case and data files. 2) open fluent, set the dicrete phase parameters, then under injections read the injection file. 3) open display/particle tracking/select the injection and the particle ID that you want to plot. 4)once you clik ok, you will see that the program reads the injection file and executes the calculation! 5) then, you can list the injection files and soon! COULD YOU PLEASE TRY A SIMPLE FILE with different name and with a fresh case and data file from your steady state calculation. I mean less than five rows of data and only one injection, instead of a long data file. This will help you to check everything faster. I think you cannot list the injection without running first a particle tracking! By the way, could you please tell me if you plan to run steady or unsteady particle tracking. Perhaps I will need your help later on! Let me know what happen to your case! Regards Alex Munoz PS: Everyone face day of completely frustrations others like me had faced months of failure, then you learn as long as some pay my time who cares. |
Re: Using file to define injection distribution!!(
Thank you, Alex. I don't know how to express my gratitude!
Yes, I have tried following your procedure and found that when I write only one or two injections in my data file, fluent can catch the injection but there are messages as follows: ERROR reading injection 0 for injection: injection-0. Number of injections read in=2 number tracked = 2, escaped = 2, aborted = 0, trapped = 0, evaporated = 0, incomplete = 0 But when I add my injection number more than two, there are access-violation messages. I am simulating bubbly flow in virtical pipe. Since I hope to get the new continuous phase velocity field after the bubbles are injected, coupled is necessary and as for steady or unsteady, I am still hesitating. Because I want to get the local void fraction of bubbles,and steady simulation will make the local void fraction incontinuous, and in the real bubbly flow,the bubbles' trajectories are some stochastic, an unsteady calculation may be closer to the real case and can give me more information. Regards winnie |
Re: Using file to define injection distribution!!(
Hi winnie
I was wondering was going on... FLuent should be able to read your file It seems to me that one of the x ,y, z coordinates is out the domain. Ohh yes that is the problem. Could you please locate your injection points a few milimiters far from the inlet and walls. Also check that your C-code is generating x-y-z values inside the domain. Regards Alex Munoz |
Re: Using file to define injection distribution!!(
Hi, Alex
I checked the location and they are surelly in the domain. Then I have another try. I locate all the injections nearlly at the center of the pipe, the fluent catch these injections. But there still the messages:"ERROR reading injection 0 for injection: injection-0." Thank you! Alex. anyway, this has made me take a deep breath. But what should my locations do now?? ^_^ Regards winnie |
Re: Using file to define injection distribution!!(
Hi,Alex
I have tried many injection locations and find that whether fluent can catch the injections depends on the location coordinates. but it is really strange. Here is my domain extents: x-coordinate: min (m) = -1.449986e-02, max (m) = 1.449986e-02 y-coordinate: min (m) = -8.829759e-18, max (m) = 3.700000e+00 z-coordinate: min (m) = -1.450000e-02, max (m) = 1.450000e-02 and the injections: ((x y z u v w diameter temperature mass-flow) name) ((0.001 0.0 0.0 0.0 0.0082 0.0 0.003 20.0 0.0000016385)0) ((-0.001 0.0 0.0 0.0 0.0082 0.0 0.003 20.0 0.0000016385)1) ((0.0001 0.0 0.0 0.0 0.0082 0.0 0.003 20.0 0.0000016385)2) ((-0.0001 0.0 0.0 0.0 0.0082 0.0 0.003 20.0 0.0000016385)3) ((-0.002 0.0 0.0 0.0 0.0082 0.0 0.003 20.0 0.0000016385)4) ((0.002 0.0 0.0 0.0 0.0082 0.0 0.003 20.0 0.0000016385)5) ((0.0015 0.0 0.0 0.0 0.0082 0.0 0.003 20.0 0.0000016385)6) can all be catched by the fluent. when x-coordinate exceeds 0.002, there will be "access violation" message. So strange!!! Do you know what's the matter? Regards winnie |
Re: Using file to define injection distribution!!(
Hi winnie
Your domain is a pipe with diameter 2.88cm therefore, you cannot locate particle at the edge, talking in radial coordinates at R=1.44cm. You must locate the injection point one milimeter from the wall(R=1.34). In addition, put the particles at less one milimeter inside the domain in the y direction if you put them at 0.0 the code cannot asign this position. Keep in my that your domain in the y-direction is 3.7 m one milimeter difference isnot going to affect your calculation!! Now, I do not know your problem. However, you have to distribute your particles in a rand manner. The distribution should be equal number of bubbles per flow rate of continuous flow. If your injection point is not a jet!! The bubble velocity should be absolute not relative as a results the bubbles near to the wall must have 0.0 m/s y-velocity and at the center the maximum velocity of your velocity profile Again, I do not your problems but your bubbles seem to me too big to apply the DRWM, the biggest diameter that I have seen is 1.0mm Please, temperature in Kelvin. K=C+273.15. therefore 293.15K not 20 And finally, injection name. You better use injection-0:1..... injection0-N. Regards Alex Munoz |
Re: Using file to define injection distribution!!(
Hi, Alex
Many, many thanks to your kindly help!! I am simulating the laminar bubbly flow in vertical pipe. The geometric and boundary conditions are from the data I have got. What I hope to calculate from the DPM simulation is the local void fraction and if possible, the liquid velocity field. I know that fluent neglect the volume effect of the bubble to the continuous phase, but I don't know how this negligence will effect the result of the simulation calculation. Do you think it is suitable to use DPM for bubbly flow simulation with bubble diameters around 3mm? Waiting for your suggestions! It seems that I have too many questions. ^_^ Hope you have a chearful mood! Regards winnie |
Re: Using file to define injection distribution!!(
HI
Because I never answer a question if I am not 100% sure, I could not give any coment about the bubble size. However, I suggest that you read this paper. Coupling of a Langrangian model with a CFD code: Application to the numerical modeling of the turbulent dispersion of droplets in a turbulent pipe flow. DOMGIN JF, HUILIER D, BURNAGE H. GARDIN P. Journal of Hydraulic research vol 35, 1997, no4 I need to ask you that help another user that is having problem with DPM, his name Gael Corre. Thank you in advance Alex Munoz |
Re: Using file to define injection distribution!!(
Hi, Alex
Don't say 'thank you' to me and it is me that should thank you. I will try my best to help anyone I can because during my studying I have got so many helps from others, especially you. But in fact, I am still a fluent beginner, what I have done is only 'eat' the fluent document. By now, I haven't calculate a result successfully. I am working hard! Regards winnie |
How to calculate the massFlow for injection file in DPM
hi all
regarding the injection file, to recall, the file is to be written like the following, e.g.: (( x y z U V W particleDia particleTemperature massFlow) injection:0) Assume I have 2E-6 kg of mass. Density of the solid is 1500 kg/m3. Assume I have particle dia of 50E-6 m (50micron). How do we calculate the massFlow? Hope anybody can help many thanks cary |
Re: How to calculate the massFlow for injection file in DPM
|
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? |
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 |
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 |
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? |
Quote:
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. |
Quote:
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. |
Quote:
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. |
I see.
But I still have to set the time manually for each one of the injections, right? Thanks again for the help. |
Quote:
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. |
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 |
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 |
|
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.
|
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. |
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 & ")" 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 |
Thank you very much for taking your time on this one.
|
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? |
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! |
Remember that in fluent decimal separator is point, so you may need to do a find and replace all commas with points.
|
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 21:07. |