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

Passive Scalar Mixing in Microreactor - steadyState solver error

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   May 31, 2024, 16:57
Default Passive Scalar Mixing in Microreactor - steadyState solver error
  #1
New Member
 
sd
Join Date: Aug 2023
Posts: 2
Rep Power: 0
newster is on a distinguished road


My project simulation deals with the study of mixing two unmixed feeds in a microfluidic mixing device. A passive scalar is used to study how the feeds mix through a mixing device (Geometry - Straight tube, Coiled tube (helical).

The idea is to solve (for Re 0.1, 10, 1000) the model for flow simulation (using simpleFoam to reach convergence and use the 'U' (velocity) file as the input for solving the passive scalar using scalarTransportFoam.

I have modified the solver to compute for 4 scalars simultaneously. The tube's inlet is cut in the ratio of 30:70 and scalars with 2 diffusivity values (10^-10 and 10^-30 m2/s) are fed in each part (2 at top and 2 at bottom) to see how it mixes. In the straight tube, the mixing will be only due to the effects of diffusion whereas in the case of the coiled tube, there will be the effects of diffusion + centrifugal force (due to curvature).

ISSUE:

I have simulated the straight tube and got close to the desired results. While running for the coiled tube (helical), I can get with the flow simulation but my scalar Simulation is wrong. The issue is, when the scalar is defined on the inlet, it doesn't move with the flow and stays right there. Sometimes the maximum scalar value on the range scale surpasses the inlet value (it can't go because there is no reaction or anything).

Since it's a passive scalar (only moves along with the fluid without influencing it), I am solving it for the steadyState condition as a scalar as well.
I have attached the input files for my simulation along with the images of results I get. Please guide me on what went wrong and how can I fix this.

-------------------------------------------------------------------

Scalar 1 file:

Code:
/*--------------------------------*- C++ -*----------------------------------*\
  =========                 |
  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
   \\    /   O peration     | Website:  https://openfoam.org
    \\  /    A nd           | Version:  10
     \\/     M anipulation  |
\*---------------------------------------------------------------------------*/
FoamFile
{
    format      ascii;
    class       volScalarField;
    object      S1;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

dimensions      [0 0 0 0 0 0 0];

internalField   uniform 0;

boundaryField
{
    inletTop
    {
        type            fixedValue;
        value           uniform 1;
    }

    inletBottom
    {
        type            fixedValue;
        value           uniform 0;
    }

    outlet
    {
        type            zeroGradient;
    }

    walls
    {
        type            zeroGradient;
    }

}

// ************************************************************************* //
Control Dict:

Code:
/*--------------------------------*- C++ -*----------------------------------*\
  =========                 |
  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
   \\    /   O peration     | Website:  https://openfoam.org
    \\  /    A nd           | Version:  10
     \\/     M anipulation  |
\*---------------------------------------------------------------------------*/
FoamFile
{
    format      ascii;
    class       dictionary;
    location    "system";
    object      controlDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

application     myFourScalarTransportFoam;

startFrom       startTime;

startTime       0;

stopAt          endTime;

endTime         50000;

deltaT          0.1;

writeControl    timeStep;

writeInterval   100;

purgeWrite      10;

writeFormat     ascii;

writePrecision  6;

writeCompression off;

timeFormat      general;

timePrecision   6;

runTimeModifiable true;


// ************************************************************************* //

fvSchemes:

Code:
/*--------------------------------*- C++ -*----------------------------------*\
  =========                 |
  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
   \\    /   O peration     | Website:  https://openfoam.org
    \\  /    A nd           | Version:  10
     \\/     M anipulation  |
\*---------------------------------------------------------------------------*/
FoamFile
{
    format      ascii;
    class       dictionary;
    location    "system";
    object      fvSchemes;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

ddtSchemes
{
    default         steadyState;
}

gradSchemes
{
    default         Gauss linear;
}

divSchemes
{
    default         none;
    div(phi,S1)      Gauss linearUpwind grad(S1);
    div(phi,S2)      Gauss linearUpwind grad(S2);
    div(phi,S3)      Gauss linearUpwind grad(S3);
    div(phi,S4)      Gauss linearUpwind grad(S4);
}

laplacianSchemes
{
    default         none;
    laplacian(DS1,S1) Gauss linear corrected;
    laplacian(DS2,S2) Gauss linear corrected;
    laplacian(DS3,S3) Gauss linear corrected;
    laplacian(DS4,S4) Gauss linear corrected;
}

interpolationSchemes
{
    default         linear;
}

snGradSchemes
{
    default         corrected;
}


// ************************************************************************* //
fvSolution:

Code:
/*--------------------------------*- C++ -*----------------------------------*\
  =========                 |
  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
   \\    /   O peration     | Website:  https://openfoam.org
    \\  /    A nd           | Version:  10
     \\/     M anipulation  |
\*---------------------------------------------------------------------------*/
FoamFile
{
    format      ascii;
    class       dictionary;
    location    "system";
    object      fvSolution;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

solvers
{
    S1
    {
        solver          PBiCGStab;
        preconditioner  DILU;
        tolerance       1e-08;
        relTol          0;
    }
    
    S2
    {
        solver          PBiCGStab;
        preconditioner  DILU;
        tolerance       1e-08;
        relTol          0;
    }
    
    S3
    {
        solver          PBiCGStab;
        preconditioner  DILU;
        tolerance       1e-08;
        relTol          0;
    }
    
    S4
    {
        solver          PBiCGStab;
        preconditioner  DILU;
        tolerance       1e-08;
        relTol          0;
    }
}

SIMPLE
{
    nNonOrthogonalCorrectors 0;
}


relaxationFactors
{
    equations
    {
        U               0.9; // 0.9 is more stable but 0.95 more convergent
        S1              0.9;
        S2              0.9;
        S3              0.9;
        S4              0.9;
        ".*"            0.9; // 0.9 is more stable but 0.95 more convergent
    }
}


// ************************************************************************* //
Please ask if required, I can provide any other information.
Attached Images
File Type: jpg geometry.jpg (7.0 KB, 5 views)
newster is offline   Reply With Quote

Reply

Tags
micro tubes, openfoam, openfoam 10, scalar mixing


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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Building OpenFOAM1.7.0 from source ata OpenFOAM Installation 46 March 6, 2022 13:21
Compile problem ivanyao OpenFOAM Running, Solving & CFD 1 October 12, 2012 09:31
Ansys Fluent 13.0 UDF compilation problem in Window XP (32 bit) Yogini Fluent UDF and Scheme Programming 7 October 3, 2012 07:24
checking the system setup and Qt version vivek070176 OpenFOAM Installation 22 June 1, 2010 12:34
user subroutine error CFDUSER CFX 2 December 9, 2006 06:31


All times are GMT -4. The time now is 14:36.