CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Running, Solving & CFD (https://www.cfd-online.com/Forums/openfoam-solving/)
-   -   SetfieldsDict in the multiphaseInterFoam (https://www.cfd-online.com/Forums/openfoam-solving/123651-setfieldsdict-multiphaseinterfoam.html)

salame September 18, 2013 02:54

SetfieldsDict in the multiphaseInterFoam
 
Hi, Formers:
It is a problem confused me a lot of days. i want to use the multiphaseInterFoam to stimulate different fluid inject in a cavity sequentially.
If one fluid injection is finished, how can the setfieldsDict be set for the next one?
If the setfieldDict not changed, i have tried this way, the calculation of the next fluid would begin from the end of previous fluid. But the result is not OK.
So, can you give me any advise?

Best regards!

mgdenno September 20, 2013 16:50

If I understand what you are trying to do, I would say that maybe you need to change the fluid entering the system using a different boundary condition and not setFields. Maybe something like the uniformFixedValue with a time varying uniformValue shown here:

http://www.openfoam.org/version2.1.0...conditions.php

I have not tried this but it is where I would start.

salame September 23, 2013 03:05

thank u for your reply! Matthew.
i have seen the webpage you recommended. To my issue, the change of u is not
enough, the fluid also be changed. like:First, water; second, oil.

mgdenno September 23, 2013 12:19

I would think that you could use this BC to change the boundary conditions in your alphaair and alphawater files to change the fluid coming into the domain.

in alphawater:
Code:


inlet
{   
        type uniformFixedValue;
        uniformValue    table
        (
            (  0  1.0)
            (100  0.0)
        );
}

in alphaair:
Code:


inlet
{   
        type uniformFixedValue;
        uniformValue    table
        (
            (  0  0.0)
            (100  1.0)
        );
}

to switch from water to air at t=100.

Like I said, I have never done this but it is where I would start.

Let me know if it works.

salame October 22, 2013 10:17

1 Attachment(s)
sorry to reply you so later, Matthew.
your patient reply is appreciated, thank you! i have done the steps like you say. in my case, there are 3 fluids, two Non-newtonian and one Newtonian. properties file:
Code:

https://www.dropbox.com/sh/i2lrvqxex...properties.jpg.phases       
          (
              oil {
                          transportModel  powerLaw;

                            nu              nu [0 2 -1 0 0 0 0] 1;
                          rho            rho [1 -3 0 0 0 0 0] 748.5;
                              powerLawCoeffs
      {
                k            k [0 2 -1 0 0 0 0] 9.065;
                n            n [0 0 0 0 0 0 0] 0.35;
                nuMin        nuMin [0 2 -1 0 0 0 0] 0.001336;
                nuMax        nuMax [0 2 -1 0 0 0 0] 8.5504342;
        }
 
}
          mercury {
                            transportModel  powerLaw;

                        nu              nu [0 2 -1 0 0 0 0] 1;
                        rho            rho [1 -3 0 0 0 0 0] 850.5;
                              powerLawCoeffs
      {
                k            k [0 2 -1 0 0 0 0] 7.065;
                n            n [0 0 0 0 0 0 0] 0.25;
                nuMin        nuMin [0 2 -1 0 0 0 0] 0.01336;
                nuMax        nuMax [0 2 -1 0 0 0 0] 7.4504342;
        }
 
}
              air { transportModel Newtonian ; nu nu [ 0 2 -1 0 0 0 0 ] 1.48e-03 ; rho rho [ 1 -3 0 0 0 0 0 ] 1 ; }

          );

refPhase        air;

And i set the alphaoil and alphamercy like this:https://www.dropbox.com/sh/i2lrvqxex...h:null-oil.jpg oilhttps://www.dropbox.com/sh/i2lrvqxex...h:null-mer.jpg
Code:

inlet
    {
        type            uniformFixedValue;
        uniformValue    table
       
(
(0 1)
(0.2 0)
)
;
    }

. mer
Code:

inlet
    {
        type            uniformFixedValue;
        uniformValue    table
      (
 
        (0 0)
        (0.2 1)
)
;

the V file:https://www.dropbox.com/sh/i2lrvqxex...#lh:null-v.jpg
Code:

inlet
    {
        type            uniformFixedValue;
        uniformValue    table
       
      (
              (0 (1 0 0))
              (0.2 (0.5 0 0))

        );
    }

. the 3 files are used the new boundrys like you say. But, i felt uncertain about the result (0.2s) :https://www.dropbox.com/sh/i2lrvqxex...E5%9B%BE00.jpgAttachment 26278, the left is the inlet , blue is the air and just the 0.2 second result, i am puzzled about this picture like water-jetting. Does the multiphaseInterFoam solver just for newtonian fluid? By the way, do you know how is the new BC setting as we mentioned in the version 1.6-ext?

https://www.dropbox.com/sh/i2lrvqxex...E5%9B%BE00.jpg
Best regards!
salame


All times are GMT -4. The time now is 05:16.