CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM Programming & Development (http://www.cfd-online.com/Forums/openfoam-programming-development/)
-   -   Inlet Boundary conditions for pressure driven flow in DSMC (http://www.cfd-online.com/Forums/openfoam-programming-development/102916-inlet-boundary-conditions-pressure-driven-flow-dsmc.html)

Jesgonse June 6, 2012 06:25

Inlet Boundary conditions for pressure driven flow in DSMC
 
I have been lately trying to program inlet boundary conditions in order to solve a test case.

The boundary conditions implemented are described in the following papers:

http://www.sciencedirect.com/science...42727X04000426

http://www.mae.wmich.edu/faculty/lio..._JCMES2000.PDF

I used as a base the Freestream.H and Freestream.C files and I modified them in order to implement the stated inflow conditions.
As well I modified the cloud in order to calculate velocity, temperature (only translational because I run the test case for Neon) and pressure at each time step because it is needed by the inflow model.

The following problems appeared when I compiled and run the test case:

1. In the inlet, after a couple of steps, I obtain negative velocities. Even forcing in the initialisation that all molecules have positive velocities, after few steps velocities in the inlet turn negative. It happens always and I haven't found any reasonable explanation.

2. When using the velocity distribution for entering molecules from the papers, wrong pressure profiles are obtained. But when leaving the original velocity treatment promising results are obtained.

As well an approach in order to calculate self-diffusion coefficient (I am not really sure about this one) and viscosity in each step is done.

CASE 1: Leaving the original velocity distribution for entering molecules
http://dl.dropbox.com/u/44385545/CASE-1.zip

CASE 2: Using the distribution velocity for entering from the papers
http://dl.dropbox.com/u/44385545/CASE-2.zip

I hope anyone has any idea, I think it is really interesting if we could obtain proper boundary conditions to simulate pressure driven flows with OpenFoam.

Jesgonse June 6, 2012 10:07

3 Attachment(s)
Case 1: Pressure

Attachment 13614

case 1: Temperature

Attachment 13615

case 1: X-velocity

Attachment 13616

anon_a June 6, 2012 10:29

I am generally interested and have been working on such flows for some time.
Currently, I don't have enough time to check the paper and discuss the BCs but I would suggest that you check your time step.

If the time step is too large, molecules enter in pulses, while they are supposed to enter in a continuous fashion in time.

If you inject them all together in sparsely distributed times, the number of injecting molecules will be unrealistically high and a large part of them will exit the boundaries very fast. This may be why you witness this effect (at least this is what I have seen in the original dsmcFoam code).

Let me know if there are any changes with a smaller time step.

javad1404 February 1, 2014 03:28

Hi
Could you solve your problem?

javad1404 February 1, 2014 03:32

Quote:

Originally Posted by Jesgonse (Post 364997)
I have been lately trying to program inlet boundary conditions in order to solve a test case.

The boundary conditions implemented are described in the following papers:

http://www.sciencedirect.com/science...42727X04000426

http://www.mae.wmich.edu/faculty/lio..._JCMES2000.PDF

I used as a base the Freestream.H and Freestream.C files and I modified them in order to implement the stated inflow conditions.
As well I modified the cloud in order to calculate velocity, temperature (only translational because I run the test case for Neon) and pressure at each time step because it is needed by the inflow model.

The following problems appeared when I compiled and run the test case:

1. In the inlet, after a couple of steps, I obtain negative velocities. Even forcing in the initialisation that all molecules have positive velocities, after few steps velocities in the inlet turn negative. It happens always and I haven't found any reasonable explanation.

2. When using the velocity distribution for entering molecules from the papers, wrong pressure profiles are obtained. But when leaving the original velocity treatment promising results are obtained.

As well an approach in order to calculate self-diffusion coefficient (I am not really sure about this one) and viscosity in each step is done.

CASE 1: Leaving the original velocity distribution for entering molecules
http://dl.dropbox.com/u/44385545/CASE-1.zip

CASE 2: Using the distribution velocity for entering from the papers
http://dl.dropbox.com/u/44385545/CASE-2.zip

I hope anyone has any idea, I think it is really interesting if we could obtain proper boundary conditions to simulate pressure driven flows with OpenFoam.

Hi Jesgonse
Could you solve your problem?
If so, would you please guide how I can apply these BCs in dsmcFoam?
How should I change FreeStream?
By the way I'm a newbie in C++. Please help me.
Thanks in advance

jmjk October 3, 2014 09:52

is the problem solved??
 
hey Jesgonse

I too am facing a similar problem. Did you find any solution to this problem?
Please do enlighten me with the solution.


All times are GMT -4. The time now is 09:19.