CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > OpenFOAM Pre-Processing

dsmcInitialise - dsmcFoam

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Display Modes
Old   April 12, 2010, 05:30
Question dsmcInitialise - dsmcFoam
  #1
Member
 
Claus Schmitzer
Join Date: Mar 2010
Posts: 30
Rep Power: 7
archymedes is on a distinguished road
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
and took a look at the mesh in paraFoam, looks like everything worked ( is there a way to test if its fine ?)

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
but i get the error that the positions file is missing !!
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.
archymedes is offline   Reply With Quote

Old   April 15, 2010, 05:44
Default
  #2
Member
 
Marta's Avatar
 
Marta Lazzarin
Join Date: Jun 2009
Location: Italy
Posts: 69
Rep Power: 7
Marta is on a distinguished road
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
Marta is offline   Reply With Quote

Old   April 19, 2010, 10:53
Default
  #3
Member
 
Claus Schmitzer
Join Date: Mar 2010
Posts: 30
Rep Power: 7
archymedes is on a distinguished road
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
archymedes is offline   Reply With Quote

Old   April 19, 2010, 16:16
Default
  #4
Member
 
Marta's Avatar
 
Marta Lazzarin
Join Date: Jun 2009
Location: Italy
Posts: 69
Rep Power: 7
Marta is on a distinguished road
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
Marta is offline   Reply With Quote

Old   May 3, 2010, 08:48
Default point source in dsmcFoam
  #5
New Member
 
Christopher Barry
Join Date: Aug 2009
Location: Switzerland
Posts: 18
Rep Power: 7
cbarry is on a distinguished road
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
cbarry is offline   Reply With Quote

Old   May 3, 2010, 09:33
Default dsmcInitialise
  #6
Member
 
Claus Schmitzer
Join Date: Mar 2010
Posts: 30
Rep Power: 7
archymedes is on a distinguished road
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
archymedes is offline   Reply With Quote

Old   May 4, 2010, 05:38
Default particle positions file
  #7
New Member
 
Christopher Barry
Join Date: Aug 2009
Location: Switzerland
Posts: 18
Rep Power: 7
cbarry is on a distinguished road
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
cbarry is offline   Reply With Quote

Old   May 4, 2010, 05:48
Default
  #8
Member
 
Claus Schmitzer
Join Date: Mar 2010
Posts: 30
Rep Power: 7
archymedes is on a distinguished road
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
archymedes is offline   Reply With Quote

Old   May 4, 2010, 06:17
Default
  #9
Member
 
Marta's Avatar
 
Marta Lazzarin
Join Date: Jun 2009
Location: Italy
Posts: 69
Rep Power: 7
Marta is on a distinguished road
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
Attached Files
File Type: zip 0.zip (11.9 KB, 73 views)
File Type: zip dsmcProperties.zip (922 Bytes, 68 views)
File Type: zip system.zip (4.7 KB, 60 views)
Marta is offline   Reply With Quote

Old   May 4, 2010, 06:47
Default
  #10
New Member
 
Christopher Barry
Join Date: Aug 2009
Location: Switzerland
Posts: 18
Rep Power: 7
cbarry is on a distinguished road
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
cbarry is offline   Reply With Quote

Old   May 18, 2010, 05:02
Default
  #11
New Member
 
Christopher Barry
Join Date: Aug 2009
Location: Switzerland
Posts: 18
Rep Power: 7
cbarry is on a distinguished road
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.
cbarry is offline   Reply With Quote

Old   June 9, 2010, 08:49
Default dsmcInitialise Solution
  #12
Member
 
Claus Schmitzer
Join Date: Mar 2010
Posts: 30
Rep Power: 7
archymedes is on a distinguished road
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 !!!
archymedes is offline   Reply With Quote

Old   June 10, 2010, 08:36
Default
  #13
New Member
 
Christopher Barry
Join Date: Aug 2009
Location: Switzerland
Posts: 18
Rep Power: 7
cbarry is on a distinguished road
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.
cbarry is offline   Reply With Quote

Old   July 8, 2010, 04:32
Default
  #14
Member
 
Marta's Avatar
 
Marta Lazzarin
Join Date: Jun 2009
Location: Italy
Posts: 69
Rep Power: 7
Marta is on a distinguished road
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
Marta is offline   Reply With Quote

Old   July 9, 2010, 06:05
Default
  #15
Member
 
m.maneshi's Avatar
 
Mehdi
Join Date: Oct 2009
Posts: 61
Rep Power: 7
m.maneshi is on a distinguished road
hi all, haven't you come to problem when converting fluent .msh mesh to foam mesh with the zero cellzone and 0 point zones ???
m.maneshi is offline   Reply With Quote

Old   July 9, 2010, 07:20
Default
  #16
Member
 
Claus Schmitzer
Join Date: Mar 2010
Posts: 30
Rep Power: 7
archymedes is on a distinguished road
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)
archymedes is offline   Reply With Quote

Old   July 9, 2010, 13:35
Default
  #17
Member
 
m.maneshi's Avatar
 
Mehdi
Join Date: Oct 2009
Posts: 61
Rep Power: 7
m.maneshi is on a distinguished road
Dear Claus
what is the role of the dos2unix you mentioned here ?? is it needed in ubuntu 9.10 either ? how about fromdos ?
m.maneshi is offline   Reply With Quote

Old   July 9, 2010, 13:57
Default
  #18
Member
 
m.maneshi's Avatar
 
Mehdi
Join Date: Oct 2009
Posts: 61
Rep Power: 7
m.maneshi is on a distinguished road
Quote:
Originally Posted by archymedes View Post
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)
i belive Ansys 12 msh mesh file is not in ASCI format , how did you manage to convert it into Foam mesh ?? this hapens when i do the FluentMeshToFoam by an ANSYS msh mesh
PHP Code:
Create time

Found unknown block
:(4
Embedded blocks in comment 
or unknown: (
Found end of section in unknown:)
Found end of section in unknown:)
Embedded blocks in comment or unknown:    (
Embedded blocks in comment or unknown:(
Found end of section in unknown:) 
Embedded blocks in comment or unknown:(
Found end of section in unknown:)
Found end of section in unknown:)
Embedded blocks in comment or unknown:    (
Embedded blocks in comment or unknown:(
Found end of section in unknown:)
Embedded blocks in comment or unknown:
        (
Found end of section in unknown:)
Found end of section in unknown:)
Embedded blocks in comment or unknown:    (
Embedded blocks in comment or unknown:(
Found end of section in unknown:)
Found end of section in unknown:)
Embedded blocks in comment or unknown:    (
Embedded blocks in comment or unknown:(
Found end of section in unknown:) 
Embedded blocks in comment or unknown:(
Found end of section in unknown:)
Found end of section in unknown:)
Dimension of grid3
Number of points
6840

number of faces
18117
Number of cells
5670
Found unknown block
:(3010
Embedded blocks in comment 
or unknown: (
Found end of section in unknown:)
(((((((((((((((
Found unknown block:(3010
Embedded blocks in comment 
or unknown: (
Found end of section in unknown:)
(((&
#65533;{��Embedded blocks in comment or unknown:
&#65533;Found end of section in unknown:?
&#2010;{��Embedded blocks in comment or unknown:
&#65533;Found end of section in unknown:?
&#65533;{��Embedded blocks in comment or unknown:
&#65533;Embedded blocks in comment or unknown:
&#65533;{�Found end of section in unknown:?
Found end of section in unknown:&#65533;
&#65533;Embedded blocks in comment or unknown:
&#65533;{�Found end of section in unknown:?
&#65533;Embedded blocks in comment or unknown:
&#65533;Found end of section in unknown:?
&#65533;{��Embedded blocks in comment or unknown:
&#65533;Embedded blocks in comment or unknown:
&#65533;[{�Found end of section in unknown:?
Found end of section in unknown:&#65533;
&#65533;Embedded blocks in comment or unknown:
&#65533;Found end of section in unknown:?
&#65533;{��Embedded blocks in comment or unknown:
&#65533;Found end of section in unknown:?
&#65533;{���
     
&#65533;
       
&#65533;
         
Embedded blocks in comment or unknown:
&
#65533;
 
    
&#65533;
      
Embedded blocks in comment or unknown:
&
#65533;[
  
&#65533;
    
&#65533;�Found end of section in unknown:��Mbp?
Found end of section in unknown:&#65533;
&#65533;�Embedded blocks in comment or unknown:
&#65533;����Embedded blocks in comment or unknown:
&#65533;[���Embedded blocks in comment or unknown:��
&#65533;��Embedded blocks in comment or unknown:
&#65533;�����Embedded blocks in comment or unknown:
&#65533;�������Embedded blocks in comment or unknown:
&#65533;[�����Embedded blocks in comment or unknown:��
&#65533;Embedded blocks in comment or unknown:
&#65533;�Embedded blocks in comment or unknown:
&#65533;�@Embedded blocks in comment or unknown:
&#65533;[��Found end of section in unknown:�
Found end of section in unknown:&#65533;
&#65533;Embedded blocks in comment or unknown:
&#65533;Found end of section in unknown:�
Found end of section in unknown:&#65533;
&#65533;Found end of section in unknown:�
Found end of section in unknown:&#65533;
&#65533;Embedded blocks in comment or unknown:
&#65533;Found end of section in unknown:�
Found end of section in unknown:&#65533;
&#65533;Found end of section in unknown:�
Found end of section in unknown:&#65533;
&#1818;Found end of section in unknown:�
Found end of section in unknown:&#65533;
Embedded blocks in comment or unknown:4
&#65533;@Embedded blocks in comment or unknown:
&#65533;[Found end of section in unknown:�
Found end of section in unknown:&#65533;
Embedded blocks in comment or unknown:4
&#1818;Found end of section in unknown:�
0Dimension of grid13
(Dimension of grid1
Dimension of grid
1
Dimension of grid
3
eDimension of grid
1
fDimension of grid
2
Dimension of grid

m.maneshi is offline   Reply With Quote

Old   July 10, 2010, 05:11
Default
  #19
Member
 
m.maneshi's Avatar
 
Mehdi
Join Date: Oct 2009
Posts: 61
Rep Power: 7
m.maneshi is on a distinguished road
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 ?
m.maneshi is offline   Reply With Quote

Old   July 10, 2010, 08:07
Default
  #20
Member
 
Claus Schmitzer
Join Date: Mar 2010
Posts: 30
Rep Power: 7
archymedes is on a distinguished road
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
archymedes is offline   Reply With Quote

Reply

Tags
dsmcfoam, initialise

Thread Tools
Display Modes

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 Off
Trackbacks are On
Pingbacks are On
Refbacks are On


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


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