CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Pre-Processing (https://www.cfd-online.com/Forums/openfoam-pre-processing/)
-   -   0 Folder for a dsmcFoam simulation (https://www.cfd-online.com/Forums/openfoam-pre-processing/94410-0-folder-dsmcfoam-simulation.html)

j3r August 18, 2014 23:00

Hi Wenjie,

Yes, it seems to work fine for me now. Was actually not that complicated once I figured out the syntax. Basically you can just copy the VHS sub-model, rename everything to VSS in the .C and .H file and in the .C file adjust the collision diameter and deflection angle according to the VSS model. Just check Bird or this paper for the details:
http://scitation.aip.org/content/aip....1063/1.858184

Of course you will also have to adjust some of the other files so that you can e.g. write alpha for each molecule into your dsmcProperties file and that dsmc knows that there is a new binary collision model (was in makeInflowModel.C or so I think). But which ones I would also have to look up, it's been a while since I worked on it. When you compile your code the error messages will tell you what is missing, e.g. if there are unknown variables that you have to define in another file or so.

Regards,
j3r

wenjie August 19, 2014 04:29

Quote:

Originally Posted by j3r (Post 506536)
Hi Wenjie,

Yes, it seems to work fine for me now. Was actually not that complicated once I figured out the syntax. Basically you can just copy the VHS sub-model, rename everything to VSS in the .C and .H file and in the .C file adjust the collision diameter and deflection angle according to the VSS model. Just check Bird or this paper for the details:
http://scitation.aip.org/content/aip....1063/1.858184

Of course you will also have to adjust some of the other files so that you can e.g. write alpha for each molecule into your dsmcProperties file and that dsmc knows that there is a new binary collision model (was in makeInflowModel.C or so I think). But which ones I would also have to look up, it's been a while since I worked on it. When you compile your code the error messages will tell you what is missing, e.g. if there are unknown variables that you have to define in another file or so.

Regards,
j3r

Thanks j3r, that's also what I thought. According to Bird's book, I should only change the deflection angle and the collision diameter to include alpha, the rest should be the same. Since in my case the diffusion is important, VSS is indeed necessary. I will also try to post my results here.

Cheers,
Wenjie

j3r August 19, 2014 07:00

Hi Wenjie,

Yes, that's right. Even though there are different equations to calculate the collision cross section. But they should all result in same value (more or less).

You will probably also be interested in this paper:
http://www.sciencedirect.com/science...09250913007252

Regards,
j3r

Sadegh yousefi May 2, 2018 05:00

Hi.please help me.how calculate concentration in dsmcfoam?

ano May 18, 2018 07:52

Hi Sadegh,

which version of dsmcFoam are you using?

In the official dsmcFoam version you can add to your controlDict
Code:

dsmcFields1
    {
        type            dsmcFields;
        libs            ("liblagrangianFunctionObjects.so");
        writeControl    writeTime;
    }

Then you should get the number density field rhoN and mass density rhoM for the different species, from these you can calculate the concentrations.

(Much more fields are calculated, if you use dsmcFoamPlus , to go through the part of this code in which the calculations are conducted (in order to understand what the fields are) is a pain though.)

Sadegh yousefi May 20, 2018 12:11

Dear ano
Hi.i am using to dsmcfoam version 5.0

Sadegh yousefi May 20, 2018 23:53

Hi ano
Please help me again.how to get the concentration from rhoN and rhoM?

samegypt June 9, 2021 06:19

Please could you update the attached link
 
Quote:

Originally Posted by alberto (Post 333011)
You find a description of the fields in the documentation of the DsmcCloud class:

http://foam.sourceforge.net/docs/cpp/a00438.html

To clarify your confusion about rhoN and dsmcRhoN, notice that rhoN is the number density (the actual one), while dsmcRhoN is the number density of the DSMC particles.

Best,




Please I would like to find a description of the fields, could you update the attached link, because it is not working



http://foam.sourceforge.net/docs/cpp/a00438.html

ano June 9, 2021 07:45

Now it is here for dsmcFOAM. And for dsmcFoamPLus here.



But it is always best to go to your src (type 'src') and then grep for what you are looking for:
Code:

grep -rH rhoN .
That lists all files in which rhoN appears and you can pick the one you need.

bhwcs October 24, 2021 04:15

the number of particles entering the inlet and the number of particles escaping from
 
Does anyone know how to determine the number of particles entering the inlet and the number of particles escaping from the inlet in DSMCFOAM? thanks!:)


All times are GMT -4. The time now is 10:50.