|
[Sponsors] |
April 12, 2010, 05:30 |
dsmcInitialise - dsmcFoam
|
#1 |
Member
Claus Schmitzer
Join Date: Mar 2010
Posts: 30
Rep Power: 16 |
Hi there,
I am new at openFoam, just installed 1.6 and try to run a dsmc simulation. Tutorial examples are running fine. Now I am attempting my first simulations. I've set up my geometry in Ansys, exported it in ascii ( .msh) ran Code:
$dos2unix $fluentMeshToFoam PROBLEM: after defining my input files: in system/ controlDict dsmcInitialiseDict fvSchemes fvSolution in constant/ dsmcProperties in 0/ boundaryT boundaryU dsmcRhoN dsmcRhoM fD iDof internalE internalKE momentum q rhoM rhoN I try to initialise the case Code:
$ dsmcInitialise /*---------------------------------------------------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: 1.6 | | \\ / A nd | Web: www.OpenFOAM.org | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ Build : 1.6-53b7f692aa41 Exec : dsmcInitialise Date : Apr 12 2010 Time : 11:18:40 Host : BE13661 PID : 3846 Case : /media/System/Claus/GasSimu/OpenFoam/valve_outlet_2D nProcs : 1 SigFpe : Enabling floating point exception trapping (FOAM_SIGFPE). // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // Create time Create mesh for time = 0 Initialising dsmc for Time = 0 --> FOAM Warning : From function Cloud<ParticleType>::initCloud(const bool checkClass) in file /home/dm2/henry/OpenFOAM/OpenFOAM-1.6/src/lagrangian/basic/lnInclude/CloudIO.C at line 51 Cannot read particle positions file "/media/System/Claus/GasSimu/OpenFoam/valve_outlet_2D/0/lagrangian/dsmc" assuming the initial cloud contains 0 particles. Constructing constant properties for H2 Initialising particles Total number of molecules added: 0 ClockTime = 0 s End I cannot define all particle positions manually. how to obtain this file, why is it needed anyway ? it's not in the tutorial cases! I really appreciate any help! cheers, archy Last edited by archymedes; April 12, 2010 at 09:39. |
|
April 15, 2010, 05:44 |
|
#2 |
Member
Marta Lazzarin
Join Date: Jun 2009
Location: Italy
Posts: 71
Rep Power: 17 |
Hi Foamers! I would like to set a simulation with dsmcFoam, but i need to create sources of particles at some of the surfaces of my geometry. Is it possible to do this without modifying the existing code?
How can I do it? Thank you! Bye Marta |
|
April 19, 2010, 10:53 |
|
#3 |
Member
Claus Schmitzer
Join Date: Mar 2010
Posts: 30
Rep Power: 16 |
create the particles once at the beginning of the simulation ?
thats initialising the simulation done with the command dsmcInitialise which doesn't work for me ( dunno why ). If you want to have a source that emits particles continously during the simu ( like aporous media ) I don't know how to do that or if it exits. @Anyone: please help me understand dsmcInitialise and which definitions and files I need to make it work properly. Thanks, Archy |
|
April 19, 2010, 16:16 |
|
#4 |
Member
Marta Lazzarin
Join Date: Jun 2009
Location: Italy
Posts: 71
Rep Power: 17 |
Thank you for your answer Archy!
Yes, what i meant is that i need to create/define a source emitting particles continuously or at some specific times. I think there is something available because after writing here i've seen the file pointMassSourceProperties inside the porousExplicitSourceReactingParcelFoam tutorial. I think i'll try using this kind of a solution. Bye Marta |
|
May 3, 2010, 08:48 |
point source in dsmcFoam
|
#5 |
New Member
Christopher Barry
Join Date: Aug 2009
Location: Switzerland
Posts: 18
Rep Power: 17 |
Hello Marta,
did you find a way to integrate point sources into dsmcFoam in the end? I found the dictionary file you mentioned, but am nor sure how to combine it with dsmcFoam. Best regards, Chris |
|
May 3, 2010, 09:33 |
dsmcInitialise
|
#6 |
Member
Claus Schmitzer
Join Date: Mar 2010
Posts: 30
Rep Power: 16 |
Hey cbarry and Marta,
how do you initialise your simulation ? which files and input are needed for that ? I still initialise Zero particles. I've noticed that the above error (positions file missing ) is also present at some of the tutorial examples but in the end there are some particles initialised in the tutorial. thanks and good luck with your porous particle source, Archy |
|
May 4, 2010, 05:38 |
particle positions file
|
#7 |
New Member
Christopher Barry
Join Date: Aug 2009
Location: Switzerland
Posts: 18
Rep Power: 17 |
Hi Archy,
I had that error message with every tutorial. On closer inspection, I noticed that the file called "positions" is actually created by dsmcInitialise in the 0/lagrangian/dsmc directory. In the tutorials, the directory itself does not actually exist before running dsmcInitialise. I however do not think that this is a problem. If I have understood the DSMC method correctly, during initialisation particles are added to the volume until the desired macroscopic boundary conditions, such as temperature, density, etc, are reached in each cell. The number of particles per parcel is a constant, and defined in the dsmcProperties dictionary. Thus openFOAM starting initialisation with 0 parcels should be no problem, as it will just add the required amount of parcels to each cell, until the number of particles corresponds with the macroscopic boundary conditions. That is at least my understanding of the process. I am however no expert. As to what the purpose of this error message is, I am not sure. Perhaps it is somehow possible to start with a certain amount of parcels in order to quicken the initialisation process. I hope this helps. Best regards, Chris |
|
May 4, 2010, 05:48 |
|
#8 |
Member
Claus Schmitzer
Join Date: Mar 2010
Posts: 30
Rep Power: 16 |
Hi Chris and thanks for the response!
You are right, the error message appears with almost every tutorial but aren't there always some particles added ? Total number of molecules added: 64218 In my case its always 0 Particles added. I am running another simulation now on Windows, as soon as I can I will switch back to linux and try to run the simu even with 0 particles initialised but would be odd if it works wouldn't it ? cheers, Archy |
|
May 4, 2010, 06:17 |
|
#9 |
Member
Marta Lazzarin
Join Date: Jun 2009
Location: Italy
Posts: 71
Rep Power: 17 |
Hi Archy!
Here are the files i'm using, I don't know if they are useful, because my settings are at the moment very similar to the original test case in OpenFoam, since i'm not an expert user of particle solvers. Hi Chris! At the moment i'm running the simulation without sorces, just to learn how the solver works, so i still do not know if my idea about how to manage sources is feasible. As soon as i understand something more i'll write it down in the forum! Marta |
|
May 4, 2010, 06:47 |
|
#10 |
New Member
Christopher Barry
Join Date: Aug 2009
Location: Switzerland
Posts: 18
Rep Power: 17 |
Sorry Archy, I seem to have misunderstood your question. Yes it would be strange if it worked with 0 particles added. My guess would be that there's a problem with your macroscopic boundary conditions, but I am not sure. I am currently trying to set up a simple test case myself. I'll let you know if I come across the same problem.
Marta, thanks for your reply. I'll also keep you updated on this forum if I make any progress with adding point sources. Best of luck to both of you, Chris |
|
May 18, 2010, 05:02 |
|
#11 |
New Member
Christopher Barry
Join Date: Aug 2009
Location: Switzerland
Posts: 18
Rep Power: 17 |
Hi Archy,
sorry to take so long to reply. I've been having some computer problems. I set up my own test case, with pressure-based boundary conditions, and have not come across the problem of no particles being added. However, the number of particles added is very small (6), thus it may be a similar problem. I'll let you know if I find the reason for this. |
|
June 9, 2010, 08:49 |
dsmcInitialise Solution
|
#12 |
Member
Claus Schmitzer
Join Date: Mar 2010
Posts: 30
Rep Power: 16 |
So the problem was just the size of my geometry. ( e.g. a 10 um channel )
its extremely small and with the particle densities from the tutorial it had like 10e-7 particles per cell, so it didn't put a particle in the cell, which was the case for all cells. increasing the densities to the actual values gave me some particles in the end ! The Warning message is "normal" and can be ignored if no file is defined ( i suppose this is to read in foregoing solutions ). Nonetheless, thanks for the responses !!! |
|
June 10, 2010, 08:36 |
|
#13 |
New Member
Christopher Barry
Join Date: Aug 2009
Location: Switzerland
Posts: 18
Rep Power: 17 |
haha what a coincidence. I just realised this week that I had the same problem. I completely overlooked that blockMesh was multiplying all the dimensions I entered by 0.01.
|
|
July 8, 2010, 04:32 |
|
#14 |
Member
Marta Lazzarin
Join Date: Jun 2009
Location: Italy
Posts: 71
Rep Power: 17 |
Hi all! I've been very busy with other stuff these days, only now i'm going back to dsmcFoam... Unfortunately I have another problem.
Do you know how to set different initial particle numbers in different zones of the domain? Do i have to prepare the mesh on purpose to be able to do this? Thank you very much in advance Marta |
|
July 9, 2010, 06:05 |
|
#15 |
Member
Mehdi
Join Date: Oct 2009
Posts: 61
Rep Power: 16 |
hi all, haven't you come to problem when converting fluent .msh mesh to foam mesh with the zero cellzone and 0 point zones ???
|
|
July 9, 2010, 07:20 |
|
#16 |
Member
Claus Schmitzer
Join Date: Mar 2010
Posts: 30
Rep Power: 16 |
I have to admit that I've never exported a .msh from fluent !
I do this from the Ansys mesher which is also capable of exporting a .msh file ( don't forget the named spaces later used for the boundary conditions ) Then dos2unix (in tofrodos package , in new ubuntu the command is fromdos i think ) then fluent3DMeshtoFoam command. works with OF 1.6 and 1.7 (Ansys 12) |
|
July 9, 2010, 13:35 |
|
#17 |
Member
Mehdi
Join Date: Oct 2009
Posts: 61
Rep Power: 16 |
Dear Claus
what is the role of the dos2unix you mentioned here ?? is it needed in ubuntu 9.10 either ? how about fromdos ? |
|
July 9, 2010, 13:57 |
|
#18 | |
Member
Mehdi
Join Date: Oct 2009
Posts: 61
Rep Power: 16 |
Quote:
PHP Code:
|
||
July 10, 2010, 05:11 |
|
#19 |
Member
Mehdi
Join Date: Oct 2009
Posts: 61
Rep Power: 16 |
Finally got the mesh exported in ASCII format and converted it to Foam mesh , but there still remains the problem with 0 cellZones and 0 faceZones
any idea what to do ? |
|
July 10, 2010, 08:07 |
|
#20 |
Member
Claus Schmitzer
Join Date: Mar 2010
Posts: 30
Rep Power: 16 |
Hi maneshi,
the dos2unix ( fromdos should do it as well especially as the dos2unix command is in the tofrodos apt-get package ) is just for converting from dos to unix fileformats, I thinks its just replacing carrage return symbols and so on. Try executing fromdos (with the correct options --help) before you convert the mesh to OG with fluent3dMeshtoFoam |
|
Tags |
dsmcfoam, initialise |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Poiseuille flow in dsmcFoam | alberto | OpenFOAM Running, Solving & CFD | 0 | December 3, 2009 02:03 |