# dsmcInitialise - dsmcFoam

 User Name Remember Me Password
 Register Blogs Members List Search Today's Posts Mark Forums Read

 LinkBack Thread Tools Display Modes
October 22, 2010, 04:56
#61
Member

Claus Schmitzer
Join Date: Mar 2010
Posts: 30
Rep Power: 8
Hey,

a mean free path length Field is a good idea! the particles per cell exist already don't they - dsmcRhoN ?

For quality ensurance I thought it might be good if this is also somehow implemented, but I don't know whats the best way of doing so. So far only one way came to my mind:
- check meanfree path length and parts per cell, if cell is bigger that pathlength divide it with snappy hex mesh, if too few parts in the cell merge it with neighbouring cell (?)

so every, say 50 timesteps you check the condition, change the mesh if necessary and continue. but I have no clue how to implement such a function yet.

Another question:
you say:
Quote:
 When I leave the freestream outflow patches with the rhoN as calculated or zeroGradient then the number density decays radially and axially from my nozzle with no accumulation at the boundaries.
I don't understand how this is possible, rhoN is just an outputfield and is not used as input for the simulation ( the numberdensities are defined in dsmcProperties dict in the Coeffs subDict ). I suppose you could get rid of the accumulation because your outflow speed together with the dsmcProperties defined numberDensity gives a high outflow rate which sucks out all particles close to the patch.

@Marta: looking forward to your piece of code

 October 22, 2010, 13:08 #62 Member   Daniel Join Date: Jul 2010 Location: California Posts: 39 Rep Power: 8 Hi Archy - Regarding dsmcRhoN: it seems to be in units of (1/m^3). Is that correct? If so, I want to obtain the number of particles in each individual cell. Marta has suggested in the past that I can use cellVolumes(), or Mesh.V. Anther option that I've seen in the literature is to use the mean free path cubed (mfp^3) and find out how many particles are in that volume by multiplying by dsmcRhoN. Regarding simulations with no accumulation: I have also run many simulations that did result in particle accumulation at the boundary. However, as soon as I boosted the outlet velocity this problem went away. Now I am seeing no accumulation, and outlet velocity that approaches the adiabatic speed limit for my modeled molecule (Argon, exiting domain in radial direction at about 700 to 750 m/s with boundaryU set at 2000 to 4000 m/s) Thanks Marta for the advice on field averaging. I'll have to also find some way of boosting the number of particles in the domain without slowing the simulation too much. Thanks both of you for clarifying so much for me.

 November 18, 2010, 21:00 #63 Member   Daniel Join Date: Jul 2010 Location: California Posts: 39 Rep Power: 8 Hi Marta - I have turned off the resetOnOutput, but I still get very low values for rhoN in certain areas even thought the simulation runs for several extra days. What I noticed after looking into the rhoN file was that only one boundary patch has low values. The internal field is fine everywhere. I just replaced all values of 1e-300 with something similar to values in nearby locations (1e-9 in my case). I'd still like to know why that happens though. Any thoughts?

 November 19, 2010, 03:40 #64 Member     Marta Lazzarin Join Date: Jun 2009 Location: Italy Posts: 70 Rep Power: 9 Hi Hyperion, I don't know precisely, i think it would be better to solve the problem having analysed your specific test case. Anyway if the problem is confined to just one patch of your boundaries, maybe something wrong is going on with your boundary conditions. It cold be that they are not properly set, in fact it is not that easy to find the correct combination of them, since there are lots of parameters to initialise. Cheers Marta

 November 19, 2010, 08:59 #65 Member     Marta Lazzarin Join Date: Jun 2009 Location: Italy Posts: 70 Rep Power: 9 Hi all, if you are interested I have implemented a new version for dsmcFoam, together with Archy, but unfortunately it is too big to be posted here. If you want this version of the code, contact me and I will send it to you by email. It is working under 1.7.1 version, but i think it can be easily exported if needed. Cheers! Marta

 November 25, 2010, 03:09 dsmcFoam #66 Senior Member   ehsan Join Date: Mar 2009 Posts: 106 Rep Power: 9 Hi Marta, Can I ask you to email me your new version of dsmcFoam? May I ask you what are your novelties in it? Thanks, Ehsan ehsan.roohi@gmail.com

January 7, 2011, 14:35
#67
New Member

Kelvin Loh
Join Date: Mar 2009
Posts: 25
Rep Power: 9
Hi Marta,

Thanks for developing the code. If you could kindly send it to this email address?

Thank you again.

Regards,
kel85uk
kel85uk@gmail.com

Quote:
 Originally Posted by Marta Hi all, if you are interested I have implemented a new version for dsmcFoam, together with Archy, but unfortunately it is too big to be posted here. If you want this version of the code, contact me and I will send it to you by email. It is working under 1.7.1 version, but i think it can be easily exported if needed. Cheers! Marta

 April 7, 2011, 11:17 dsmcModFoam #68 Senior Member   ehsan Join Date: Mar 2009 Posts: 106 Rep Power: 9 Hi As you may know, the modified version of dsmcFoam had been relased recently under the name of dsmcModFoam. It is claimed that it can solve pressure driven flows. www.physimmasters.com/wordpress/?page_id=187 I installed dsmcModFoam and runned a channel test case with it. What I see in this test case and also another one is that the code does not reach to the specified rhoN and rhoM at the next time step after start, and also at steady state condition. Also, the solution does not agree with slip BC's analytical solutions for low Kn number flows. I think there is an error in dsmcModFoam wrting, as they didn't follow the algorithm which links the specified density at the inlet/outlet to the velocity field. Please see my papers in this matter like: http://www.springerlink.com/content/0049838586003n25/ If any one could comment on this matter (or say that maybe I am making a mistake), I will be happy as the authors of dsmcModFoam didn't reply to me. Regards

 April 7, 2011, 16:37 #69 Member     Marta Lazzarin Join Date: Jun 2009 Location: Italy Posts: 70 Rep Power: 9 Hi all, I am the person who wrote the dsmcModFoam code. I ran more than one test case with dsmcModFoam before making it available. I think Ehsan has probably not read carefully enough all the material provided with the source code about how the code works and I also think he did not set the boundary conditions properly, that's why he says it does not work. Of course, the modification I made is not able to solve ALL kinds of existing flows, but I am sure no code is able to perform such a miracle. I validated my code using data from a paper by Varoutis et al, where also some analytical expressions are given to determine the non dimensional mass flow rate, given some parameters characterising the flow such as: the inlet and outlet pressures and a parameter connected to the Knudsen number. What I did in this validation was to apply the pressure ratio given in the paper and verify if the output in terms of non dimensional mass flow rate agreed well with the value expected. The error I found was within 2% with respect to the analytical expression of the paper. That's why I can say that the code has been validated, at least for my test case. And of course, the modification I made is done for my own application and needs. Unfortunately I cannot post the validation because it is for a private work and still needs to be published in my PhD thesis. And, for Ehsan: as long as you ask me information about how to run a basic simulation with my code, which i made free for everyone, I can answer, but when you ask me to do validations for you or to verify the set up of entire test cases, then I simply remaind you that I am part of a consulting company. If you need some more information or want the code to perform something related to your specific application or simply want to point out exactly where the bug is in your opinion, then write to the company email address being specific about where the error has been made in the source code, not to my private email. Finally, if any of you finds an error, you can contact me, because I do not know yet what the limits of the code are, thus it is possible that it does not work for any of you. Thanks a lot Kind Regards Marta

 April 7, 2011, 23:20 #70 Senior Member   ehsan Join Date: Mar 2009 Posts: 106 Rep Power: 9 My previous post was directed to general users of dsmcFoam and not directed to any special person. However, I think all of us should follow some scientific and ethical guidelines. dsmcFoam had been developed as a result of considerable joint work between different researchers and had been fully tested and validated before the official release. Without having such a good background, no further modifications like dsmcModFoam was possible. So, I think all of us should work in favor of improving dsmcFoam and it is very excellent to share our new outcomes in a correct way with other researchers in the world, which results in future codes and developments. The philosophy of open source is simply this! In fact, the first journal paper from dsmcfoam had been published one year after the official release of the code w.o any fear of repeated work reporting. Directing any inquiry about the code to a Consulting company is rational if we make sure about the accuracy of the code at first. I think it is more interesting that developer of dsmcModFoam release some very standard and simple test cases with it, like dsmcFoam, so that any user of it becomes confident that the code is correct and works fine before starting to use or improving the code. That's all!

 April 8, 2011, 03:10 #71 Member     Marta Lazzarin Join Date: Jun 2009 Location: Italy Posts: 70 Rep Power: 9 Hi Ehsan, I was not given any time to verify the bugs you think are present in the code before writing in the forum that nothing works. The modification to the code was tested just for specific test cases I verified. In the Physimmasters web site it is specified what the code can and cannot do. You are not forced to use it, if it does not fit your needs. You can simply use the standard version. The source code is open and so available to everyone, thus if you believe there are any bugs or something that can be improved, you can provide a useful bug report. Saying “nothing works” is not useful. Since you talked about ethics, I think it’s not that correct from you to publish in the forum that I did not answer, after just 24 hours you contacted me asking to analyse your test case. I am very busy and think I am not supposed to answer in few hours. I think this is degenerating into a flame, I am always available for discussion and bug reports, but if they are constructive. So I will not further answer to this thread. Marta

 April 21, 2011, 13:15 #72 New Member   Behzad Join Date: Apr 2011 Posts: 1 Rep Power: 0 Hi all I read all your comments here and I should say it sincerely that all of them were totally useful for me. @ Marta: your efforts on dsmcFoam are really appreciable and makes you an expert in this field, but I should mention your last argument with Ehsan was not that correct. I kind of know Ehsan, I think he is not just "a person" who works on dsmcFoam! He is a person who "wrote" the dsmcFoam code with his team within the framework of OpenFoam! and you can see his name as "E.Roohi" in publications about dsmcFoam. ( I really appreciate him) so i think he really concerns about dsmcFoam and how it develops. I think if you who are such an expert and Ehsan have constructive discussion with each other about this issue it can be totally helpful and this field can have a promising future Best Wishes For You Behzad Last edited by Behzad_m; April 22, 2011 at 07:49.

 April 22, 2011, 09:07 #73 New Member   Mohajer Join Date: Apr 2011 Posts: 5 Rep Power: 7 Hi I ran a simulation of external flow over a cylinder (Bird's case study) by dsmcFoam and I noticed all forces on the cylinder are zero!! I set MaxwellianThermal as WallInteractionModel and other parameters are like other dsmcFoam's tutorials. There are about 600000 particles in my domain. could you tell me what's the problem? and what can I do? Regards

 April 22, 2011, 09:13 #74 Senior Member   ehsan Join Date: Mar 2009 Posts: 106 Rep Power: 9 Hello, You should describe more about your test set up. Do you solve it correctly in terms of velocity contours and others? May I ask you whether you already tried a more simple geometry like flat plate (Bird test case) and compare Cf and Ch? Regards

 April 24, 2011, 11:05 #75 New Member   Mohajer Join Date: Apr 2011 Posts: 5 Rep Power: 7 Hi Ehsan I faced another problem when I wanted to get resuls from my case! when I ran one of the dsmcFoam's tutorials (wedge flow) there were some parameters like P, internalT, transiyionalT, overallT and Umean in its output which aren't in my case's output. I compared my case with that tutorial and there were'nt any significant diffrences. how can I get these parameters and other ones like Mach number and etc. in output?

 April 24, 2011, 11:37 #76 Senior Member   ehsan Join Date: Mar 2009 Posts: 106 Rep Power: 9 Hi, Please write the command dsmcFiledCalc in terminal as you finish your runs. Also read our Computers and Fluids journal paper carefully. Regards

 April 24, 2011, 12:05 #77 New Member   Mohajer Join Date: Apr 2011 Posts: 5 Rep Power: 7 Thank you so much for you quick answer. I tried it and It was totally helpful. Best wishes for you

 May 1, 2011, 10:53 #78 New Member   Mohajer Join Date: Apr 2011 Posts: 5 Rep Power: 7 Hi Ehsan I ran flat plate and compared Cf and Ch, results have good agreement with your Computers and Fluids journal paper. then when I ran cylinder, I noticed during run Intenal energy is zero and rhoNMean in output is almost zero near the surface. I used structured mesh.The cell width is in order of mean free path and I put 30 particles in each cell.What is the problem? Should I use unstructured mesh?! Regards

 May 1, 2011, 11:39 #79 Senior Member   ehsan Join Date: Mar 2009 Posts: 106 Rep Power: 9 Salaam Your problem depends on mesh certainly, but no difference between Unstruc and struct meshes. Please use coarse grids on the wake behind cylinder, as you will have few particels there as density is low. Also, if you solve monoatomic gases like Argon, rotational energy will be zero. See papers of thomas schwartzentruber in Journal of Computational physics on cylinder simulations. Regards

 May 10, 2011, 09:55 #80 New Member   Mohajer Join Date: Apr 2011 Posts: 5 Rep Power: 7 Hi Ehsan First of all thank you for your recent advices, they were totally helpful. I tried flat plate and cylinder and I achieved good results.Now I am going to run a sphere and I want to know your suggestion about the mesh. which one do you suggest, generating mesh by openFoam or generating by Gambit and converting it to openFoam? and what about structured or unstructured mesh, which one do you suggest?

 Tags dsmcfoam, initialise

 Thread Tools Display Modes Linear Mode

 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 OffTrackbacks are On Pingbacks are On Refbacks are On Forum Rules

 Similar Threads Thread Thread Starter Forum Replies Last Post alberto OpenFOAM Running, Solving & CFD 0 December 3, 2009 03:03

All times are GMT -4. The time now is 03:33.

 Contact Us - CFD Online - Top