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

Fluid flow from a pipe

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

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   May 6, 2019, 11:47
Default Fluid flow from a pipe
  #1
Senior Member
 
Raza Javed
Join Date: Apr 2019
Location: Germany
Posts: 183
Rep Power: 7
Raza Javed is on a distinguished road
Hello Everyone,


I made a very simple geometry in Salome, a rectangular pipe, and I want to model the fluid flow from it.


I try to explain my problem as clear as I can.


My geometry has 2 regions. (one is pipe and other is fluid). You can see the geometry below in the figure. (The yellow region is the fluid and the outer green region is pipe)



I imported this geometry to Openfoam using ideasUnvToFoam. I am using chtMultiRegionSimpleFoam. After changing all the boundary conditions using changeDictionaryDict. When I run the solver, I get the following error:




Code:
Solving for fluid region fluid
#0  Foam::error::printStack(Foam::Ostream&) at ??:?
#1  Foam::sigFpe::sigHandler(int) at ??:?
#2  ? in "/lib/x86_64-linux-gnu/libc.so.6"
#3  Foam::divide(Foam::Field<double>&, Foam::UList<double> const&, Foam::UList<double> const&) at ??:?
#4  Foam::tmp<Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> > Foam::operator/<Foam::fvPatchField, Foam::volMesh>(Foam::tmp<Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> > const&, Foam::tmp<Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> > const&) at ??:?
#5  Foam::fluidThermo::nu() const at ??:?
#6  Foam::laminar<Foam::ThermalDiffusivity<Foam::CompressibleTurbulenceModel<Foam::fluidThermo> > >::nuEff() const at ??:?
#7  Foam::linearViscousStress<Foam::ThermalDiffusivity<Foam::CompressibleTurbulenceModel<Foam::fluidThermo> > >::divDevRhoReff(Foam::GeometricField<Foam::Vector<double>, Foam::fvPatchField, Foam::volMesh>&) const at ??:?
#8  ? at ??:?
#9  __libc_start_main in "/lib/x86_64-linux-gnu/libc.so.6"
#10  ? at ??:?
Floating point exception (core dumped)

It shows that when it starts solving the fluid region, it gives the error. The problem is that I couldn't even understand what is the error?



I am attaching my changeDictionaryDict from system/region_name for your reference:


PIPE
Code:
FoamFile
{
    version     2.0;
    format      ascii;
    class       dictionary;
    object      changeDictionaryDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

T
{
    internalField   uniform 300;
    pipeInlet
    {
        type            wall;

    }
    pipeOutlet
    {
        type            wall;

    }
    defaultFaces
    {
        type            wall;

    }
    boundaryField
    {
        "pipeInlet"
        {
            type            fixedValue;
            value           uniform 300;
        }
        "pipeOutlet"
        {
            type            fixedValue;
            value           uniform 300;
        }
        "defaultFaces"
        {
            type            zeroGradient;

        }

        "pipe_to_.*"
        {
            type            compressible::turbulentTemperatureCoupledBaffleMixed;
            Tnbr            T;
            kappaMethod     solidThermo;
            kappaName       none;
            value           uniform 300;
        }
    }
}

And the boundary file from constant/region_name/polymesh is given below:
Code:
FoamFile
{
    version     2.0;
    format      ascii;
    class       polyBoundaryMesh;
    location    "constant/pipe/polyMesh";
    object      boundary;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

4
(
    pipeInlet
    {
        type            patch;
        nFaces          36;
        startFace       4896;
    }
    pipeOutlet
    {
        type            patch;
        nFaces          36;
        startFace       4932;
    }
    defaultFaces
    {
        type            patch;
        nFaces          1108;
        startFace       4968;
    }
    pipe_to_fluid
    {
        type            mappedWall;
        inGroups        1(wall);
        nFaces          860;
        startFace       6076;
        sampleMode      nearestPatchFace;
        sampleRegion    fluid;
        samplePatch     fluid_to_pipe;
    }
)

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

And for fluid region, the corresponding files are given below:


FLUID
system/region_name/changeDictionaryDict

Code:
FoamFile
{
    version     2.0;
    format      ascii;
    class       dictionary;
    object      changeDictionaryDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
boundary
{
    fluidInlet
    {
        type            wall;
    }
    fluidOutlet
    {
        type            wall;
    }
}
U
{
    internalField   uniform (0 0 0.001);

    boundaryField
    {
        fluidInlet
        {
            type            fixedValue;
            value           uniform (0 0 0.001);
        }

        fluidOutlet
        {
            type            inletOutlet;
            inletValue      uniform (0 0 0);
        }

        ".*"
        {
            type            noSlip;
        }
    }
}

T
{
    internalField   uniform 300;

    boundaryField
    {
        fluidInlet
        {
            type            fixedValue;
            value           uniform 300;
        }

        fluidOutlet
        {
            type            inletOutlet;
            inletValue      uniform 300;
        }

        ".*"
        {
            type            zeroGradient;
            value           uniform 300;
        }

        "fluid_to.*"
        {
            type            compressible::turbulentTemperatureCoupledBaffleMixed;
            Tnbr            T;
            kappaMethod     fluidThermo;
            value           uniform 300;
        }
    }
}


epsilon
{
    internalField   uniform 0.01;

    boundaryField
    {
        minX
        {
            type            fixedValue;
            value           uniform 0.01;
        }

        maxX
        {
            type            inletOutlet;
            inletValue      uniform 0.01;
        }

        ".*"
        {
            type            epsilonWallFunction;
            value           uniform 0.01;
        }
    }
}

k
{
    internalField   uniform 0.1;

    boundaryField
    {
        minX
        {
            type            inletOutlet;
            inletValue      uniform 0.1;
        }

        maxX
        {
            type            zeroGradient;
            value           uniform 0.1;
        }

        ".*"
        {
            type            kqRWallFunction;
            value           uniform 0.1;
        }
    }
}


p_rgh
{
    internalField   uniform 0;

    boundaryField
    {
        fluidInlet
        {
            type            zeroGradient;
            value           uniform 0;
        }

        fluidOutlet
        {
            type            fixedValue;
            value           uniform 0;
        }

        ".*"
        {
            type            fixedFluxPressure;
            value           uniform 0;
        }
    }
}

p
{
    internalField   uniform 0;

    boundaryField
    {
        ".*"
        {
            type            calculated;
            value           uniform 0;
        }
    }
}

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

and Constant/region_name/polymesh/boundary


Code:
FoamFile
{
    version     0.0;
    format      ascii;
    class       polyBoundaryMesh;
    location    "constant/fluid/polyMesh";
    object      boundary;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //


3
(
    fluidInlet
    {
        type            wall;
        nFaces          32;
        startFace       5723;
    }

    fluidOutlet
    {
        type            wall;
        nFaces          30;
        startFace       5755;
    }

    fluid_to_pipe
    {
        type            mappedWall;
        inGroups        1 ( wall );
        nFaces          860;
        startFace       5785;
        sampleMode      nearestPatchFace;
        sampleRegion    pipe;
        samplePatch     pipe_to_fluid;
    }

)

I shall be thankful if someone can guide, what exactly this error is? and How can I rectify it?


Thank you
Attached Images
File Type: png Screenshot from 2019-05-06 17-44-52.png (9.8 KB, 60 views)
Raza Javed is offline   Reply With Quote

Old   May 6, 2019, 12:07
Default
  #2
Senior Member
 
Alexey Matveichev
Join Date: Aug 2011
Location: Nancy, France
Posts: 1,938
Rep Power: 39
alexeym has a spectacular aura aboutalexeym has a spectacular aura about
Send a message via Skype™ to alexeym
Hi,

The error is division by zero during calculation of fluid kinematic viscosity. It is calculated using dynamic viscosity and density. So the question is, why density of your fluid is zero? It could be due tu your initial conditions or due to supplied thermophysical properties.
alexeym is offline   Reply With Quote

Old   May 6, 2019, 12:19
Default
  #3
Senior Member
 
sheaker's Avatar
 
Oskar
Join Date: Nov 2015
Location: Poland
Posts: 184
Rep Power: 10
sheaker is on a distinguished road
Hello.


Why did You modeled structure of pipe? It looks like You are only interested in fluid flow.


Best regards,
Oskar
sheaker is offline   Reply With Quote

Old   May 7, 2019, 04:56
Default
  #4
Senior Member
 
Raza Javed
Join Date: Apr 2019
Location: Germany
Posts: 183
Rep Power: 7
Raza Javed is on a distinguished road
Quote:
Originally Posted by alexeym View Post
Hi,

The error is division by zero during calculation of fluid kinematic viscosity. It is calculated using dynamic viscosity and density. So the question is, why density of your fluid is zero? It could be due tu your initial conditions or due to supplied thermophysical properties.



Thank you so much for your answer. It solved my problem.



I have one more question, that how can I see the fluid flow from my geometry?


I mean, when I run my simulation, I want to visualize the fluid flow from my rectangular pipe. but I don't exactly know, how to do it.


I have read somewhere, that I need to have "alpha1" in my "0" directory.
Can you please help me in this?


Thank you
Raza Javed is offline   Reply With Quote

Old   May 7, 2019, 05:18
Default
  #5
Senior Member
 
Raza Javed
Join Date: Apr 2019
Location: Germany
Posts: 183
Rep Power: 7
Raza Javed is on a distinguished road
Quote:
Originally Posted by sheaker View Post
Hello.


Why did You modeled structure of pipe? It looks like You are only interested in fluid flow.


Best regards,
Oskar



Thank you so much for your reply.


Yes I am interested in fluid flow.


I made two regions in my geometry. As you can see in the figure, the outer green region is pipe and the inner yellow region is fluid.



And I want to see, the fluid flowing from inlet to outlet in Paraview.


But I am unable to do it because I don't know what exactly to put into the region directories of fluid and pipe.


I thought I need to select "U" in Paraview to see the fluid flowing, but when I do it, it shows nothing.


I don't know If I am making mistakes in writing the boundary conditions OR I am missing something to put into the region directories.


Maybe, I am not so clear in explaining my problem. Please let me know if you need any clarification to answer my question.


Thank you
Raza Javed is offline   Reply With Quote

Old   May 7, 2019, 05:27
Default
  #6
Senior Member
 
Raza Javed
Join Date: Apr 2019
Location: Germany
Posts: 183
Rep Power: 7
Raza Javed is on a distinguished road
One more question here,


Why do we use "alpha1" file in the "0" directory?


If I want to visualize the fluid flow from a pipe then do I need "alpha1" file?


Thank you
Raza Javed is offline   Reply With Quote

Old   May 7, 2019, 05:59
Default
  #7
Senior Member
 
Alexey Matveichev
Join Date: Aug 2011
Location: Nancy, France
Posts: 1,938
Rep Power: 39
alexeym has a spectacular aura aboutalexeym has a spectacular aura about
Send a message via Skype™ to alexeym
It is not quite clear what difficulties you encounter during visualisation. You open case in ParaView, you select your pipe region, you do the visualisation.

alpha1 in 0 folder appears in two-phase simulations (eg. interFoam solver). For CHT simulations, usually there is no need in alpha1.
alexeym is offline   Reply With Quote

Old   May 7, 2019, 06:05
Default
  #8
Senior Member
 
Raza Javed
Join Date: Apr 2019
Location: Germany
Posts: 183
Rep Power: 7
Raza Javed is on a distinguished road
Quote:
Originally Posted by alexeym View Post
It is not quite clear what difficulties you encounter during visualisation. You open case in ParaView, you select your pipe region, you do the visualisation.

alpha1 in 0 folder appears in two-phase simulations (eg. interFoam solver). For CHT simulations, usually there is no need in alpha1.

Thank you for your reply. OK it means I don't need alpha1.


Yes I open case in paraview, I select the fluid region and I want to see the velocity profile. and it shows the following (figure below)




It looks like from the figure that the velocity becomes zero right after inlet surface.


I don't know should it be like this? because fluid should go from inlet to outlet.
Attached Images
File Type: jpg fluid1.jpg (77.8 KB, 68 views)
Raza Javed is offline   Reply With Quote

Old   May 7, 2019, 12:29
Default
  #9
Senior Member
 
sheaker's Avatar
 
Oskar
Join Date: Nov 2015
Location: Poland
Posts: 184
Rep Power: 10
sheaker is on a distinguished road
Well... I think that walls are no-slip so velocity is always zero. Try to check velocity in interior part.


You don't need to model pipe itself. Just model interior part where fluid flows.


Best regards,
Oskar
sheaker is offline   Reply With Quote

Old   May 8, 2019, 03:09
Default
  #10
Senior Member
 
Raza Javed
Join Date: Apr 2019
Location: Germany
Posts: 183
Rep Power: 7
Raza Javed is on a distinguished road
Quote:
Originally Posted by sheaker View Post
Well... I think that walls are no-slip so velocity is always zero. Try to check velocity in interior part.


You don't need to model pipe itself. Just model interior part where fluid flows.


Best regards,
Oskar

Thank you for your reply. It was really helpful.



I have one more question, Now it is showing me the velocity profile at the surfaces and also inside the geometry.



How can we visualize the fluid flow in this pipe domain?




Thank you
Attached Images
File Type: jpg fluid2.jpg (76.0 KB, 22 views)
Raza Javed is offline   Reply With Quote

Old   May 8, 2019, 12:03
Default
  #11
Senior Member
 
sheaker's Avatar
 
Oskar
Join Date: Nov 2015
Location: Poland
Posts: 184
Rep Power: 10
sheaker is on a distinguished road
Hello.

I am not using openFoam now, so I cannot reproduce Your case.



If I were You I would model just a half of the domain and use symmetry boundary condition. In that case interior part will be well exposed.
I don't know if this solution will be suitable for You.


Best regards,
Oskar
sheaker is offline   Reply With Quote

Old   May 10, 2019, 03:17
Default
  #12
Senior Member
 
Alexey Matveichev
Join Date: Aug 2011
Location: Nancy, France
Posts: 1,938
Rep Power: 39
alexeym has a spectacular aura aboutalexeym has a spectacular aura about
Send a message via Skype™ to alexeym
Hi,

@Raza Javed

Select fluid region and use Clip filter to cut it in half (plane should have normal perpendicular to the tube axis). This way you will be able to see what is inside your tube.
alexeym is offline   Reply With Quote

Old   May 10, 2019, 10:19
Default
  #13
Senior Member
 
Raza Javed
Join Date: Apr 2019
Location: Germany
Posts: 183
Rep Power: 7
Raza Javed is on a distinguished road
Thank you so much for your reply. It was really helpful.


I have one more question related to same geometry.


I know the Pressure, Velocity and Temperature of the fluid at the inlet.



Now, if due to some reason, some temperature rise from the outside of the pipe occurs, that will also raise the temperature of the fluid, then at the outlet the temperature of the fluid will be different. How can I find the temperature at the outlet?


And what boundary conditions for pressure, velocity and temperature would be suitable at inlet and outlet?


I shall be very thankful if you can help me out in this.


Thank you
Raza Javed is offline   Reply With Quote

Old   May 13, 2019, 05:24
Default
  #14
Member
 
Join Date: Mar 2016
Posts: 73
Rep Power: 10
sufjanst is on a distinguished road
There are different ways to find out your outlet temperature.

You can simply do it in paraview or you can use the funciton 'sample'.
I guess the standard boundary conditions should be fine for your inlet and outlet (fixedValue, inletOutlet, noSlip).



I got interested in your thread because you managed to import a Salome Mesh to OpenFOAM. Can you tell me how you did that? I created a mesh but when I try to use ideasUnvToFoam I get the error 'cell type 22 not supported'. I use OpenFOAM 6.


Thank you and good luck
sufjanst is offline   Reply With Quote

Old   May 13, 2019, 05:27
Default
  #15
Senior Member
 
Raza Javed
Join Date: Apr 2019
Location: Germany
Posts: 183
Rep Power: 7
Raza Javed is on a distinguished road
Thank you so much for your reply.


Which options/hypothesis did you use while creating a mesh in Salome?
Raza Javed is offline   Reply With Quote

Old   May 20, 2019, 03:32
Default
  #16
Senior Member
 
Raza Javed
Join Date: Apr 2019
Location: Germany
Posts: 183
Rep Power: 7
Raza Javed is on a distinguished road
Quote:
Originally Posted by alexeym View Post
Hi,

The error is division by zero during calculation of fluid kinematic viscosity. It is calculated using dynamic viscosity and density. So the question is, why density of your fluid is zero? It could be due tu your initial conditions or due to supplied thermophysical properties.

Hello @alexeym,


I have one another problem, and I thought you could help me in this.





I am using chtMultiRegionSimpleFoam and my OpenFoam version is 4.1.



Now, I am able to simulate the fluid. But somehow it doesn't seem to be working well.


I am facing problems in boundary conditions for the fluid region. I am trying different combinations of boundary conditions of (velocity, Pressure and Temperature), but I don't really know that which one is correct, because my solver is not converging as per my understanding.


My requirement is that I need to put some fix velocity at the inlet and there is a temperature change along the fluid region due to some hot plates working as heat sources outside the walls of fluid region. And then, I want to see the temperature change at the outlet of the fluid region. I don't have any particular requirement for pressure in my simulation. With these conditions, I want to check at which value of velocity does my simulation reaches the steady state? Also I defined my fluid to be laminar flow. Is it correct?



My problem is that when I change the values of velocity and pressure, my solver RUNS but after some iterations, it gives an error that "maximum number of iterations exceeded". And then I tried to reduce the time interval in the "controlDict" file, then my solver runs completely without error, but my final residual is too high that it doesn't seem to be converging.



I am posting my solver log and my changeDictionaryDict (boundary conditions).
if you can please have a look, I shall be very thankful because I am not able to interpret the log because I am new to OpenFoam.


changeDictionaryDict File



Code:
boundary
{
    inlet
    {
        type            patch;
    }
    outlet
    {
        type            patch;
    }

}
U
{
    internalField   uniform (0 1e-3 0);

    boundaryField
    {
        inlet
        {
            type                fixedValue;//flowRateInletVelocity;//pressureInletVelocity;//
            //volumetricFlowRate  0.2;
            //extrapolateProfile  yes;
            value               uniform (0 1e-3 0);
        }

        outlet
        {
            type                inletOutlet;//zeroGradient;////
            value               $internalField;//uniform (0 0 0);//
            inletValue          $internalField;
        }
        "fluid_to_box"
        {
            type                noSlip;
        }
    }
}

T
{
    internalField   uniform 300;

    boundaryField
    {
        inlet
        {
            type            fixedValue;
            value           uniform 300;//$internalField;
            
        }

        outlet
        {
            type            inletOutlet;
            value           $internalField;
            inletValue      $internalField;
        }

        "fluid_to_box"
        {
            type            compressible::turbulentTemperatureCoupledBaffleMixed;
            Tnbr            T;
            kappaMethod     fluidThermo;
            value           uniform 300;
        }
    }
}


epsilon
{
    internalField   uniform 0.01;

    boundaryField
    {
        inlet
        {
            type            fixedValue;
            value           uniform 0.01;
        }

        outlet
        {
            type            inletOutlet;
            inletValue      uniform 0.01;
        }

        ".*"
        {
            type            epsilonWallFunction;
            value           uniform 0.01;
        }
    }
}

k
{
    internalField   uniform 0.1;

    boundaryField
    {
        inlet
        {
            type            inletOutlet;
            inletValue      uniform 0.1;
        }

        outlet
        {
            type            zeroGradient;
            value           uniform 0.1;
        }

        ".*"
        {
            type            kqRWallFunction;
            value           uniform 0.1;
        }
    }
}


p_rgh
{
    internalField   uniform 0;

    boundaryField
    {
        inlet
        {
            type            fixedFluxPressure;//zeroGradient;
            value           uniform 0;
        }

        outlet
        {
            type            fixedValue;
            value           uniform 0;
        }

        ".*"
        {
            type            fixedFluxPressure;
            value           uniform 0;
        }
    }
}
p
{
    internalField   uniform 0;

    boundaryField
    {
        inlet
        {
            type            zeroGradient;
            //value           uniform 1;
        }
        outlet  
        {
            type            fixedValue;
            value           uniform 0;
        }        
        "fluid_to_.*"
        {
            type            zeroGradient;
        }
    }
}

Log File


Code:
Time = 4


Solving for fluid region fluid
DILUPBiCG:  Solving for Ux, Initial residual = 0.6911749, Final residual = 0.04280814, No Iterations 2
DILUPBiCG:  Solving for Uy, Initial residual = 0.6577878, Final residual = 0.04376797, No Iterations 2
DILUPBiCG:  Solving for Uz, Initial residual = 0.5181872, Final residual = 0.02078987, No Iterations 2
DILUPBiCG:  Solving for h, Initial residual = 0.5998981, Final residual = 0.03528898, No Iterations 2


--> FOAM FATAL ERROR: 
Maximum number of iterations exceeded

     From function Foam::scalar Foam::species::thermo<Thermo,  Type>::T(Foam::scalar, Foam::scalar, Foam::scalar, Foam::scalar  (Foam::species::thermo<Thermo, Type>::*)(Foam::scalar,  Foam::scalar) const, Foam::scalar (Foam::species::thermo<Thermo,  Type>::*)(Foam::scalar, Foam::scalar) const, Foam::scalar  (Foam::species::thermo<Thermo, Type>::*)(Foam::scalar) const)  const [with Thermo =  Foam::hConstThermo<Foam::rhoConst<Foam::specie> >; Type =  Foam::sensibleEnthalpy; Foam::scalar = double;  Foam::species::thermo<Thermo, Type> =  Foam::species::thermo<Foam::hConstThermo<Foam::rhoConst<Foam::specie>  >, Foam::sensibleEnthalpy>]
    in file /home/ubuntu/OpenFOAM/OpenFOAM-4.1/src/thermophysicalModels/specie/lnInclude/thermoI.H at line 66.

FOAM aborting

#0  Foam::error::printStack(Foam::Ostream&) at ??:?
#1  Foam::error::abort() at ??:?
#2   Foam::heRhoThermo<Foam::rhoThermo,  Foam::pureMixture<Foam::constTransport<Foam::species::thermo<Foam::hConstThermo<Foam::rhoConst<Foam::specie>  >, Foam::sensibleEnthalpy> > > >::calculate() at ??:?
#3   Foam::heRhoThermo<Foam::rhoThermo,  Foam::pureMixture<Foam::constTransport<Foam::species::thermo<Foam::hConstThermo<Foam::rhoConst<Foam::specie>  >, Foam::sensibleEnthalpy> > > >::correct() at ??:?
#4  ? at ??:?
#5  __libc_start_main in "/lib/x86_64-linux-gnu/libc.so.6"
#6  ? at ??:?
Aborted (core dumped)


What combination of boundary condition would be ideal for my case? OR is there something else other than the boundary conditions that I am missing?


Thank you
Raza Javed is offline   Reply With Quote

Old   May 20, 2019, 08:03
Default
  #17
Senior Member
 
Alexey Matveichev
Join Date: Aug 2011
Location: Nancy, France
Posts: 1,938
Rep Power: 39
alexeym has a spectacular aura aboutalexeym has a spectacular aura about
Send a message via Skype™ to alexeym
Hi,

OK. Let's start from the very beginning. Forget about boundary conditions for a minute. Describe your process.

You have a flow inside a tube. You have a liquid with constant temperature are one end (inlet). There are heat sources outside the tube.

So the following questions should be addressed BEFORE any further discussion about suitable boundary conditions:
- Are you interested in temperature distribution inside pipe itself?
- What is your Re?
- Is distribution of the external heat sources constant?
- What flow parameters you have at the inlet? What information you have at the outlet?
alexeym is offline   Reply With Quote

Old   May 20, 2019, 08:38
Default
  #18
Senior Member
 
Raza Javed
Join Date: Apr 2019
Location: Germany
Posts: 183
Rep Power: 7
Raza Javed is on a distinguished road
Thank you so much for your reply.

Pardon me if my language is confusing for you. Since I am new to OpenFoam, I am not familiar with most of the terms. But I will try to explain my level best.


I try to explain my problem from the start.


I am attaching my geometry with this. one image is the complete box and the other one is inside box.(3 blue long rectangles and one green pipe with inlet and outlet).


I made this geometry on Salome, and then I imported in Openfoam using UNV file.


Then I put my boundary conditions using system/region_name/changeDictionaryDict.


The answers to your questions are:


1. I am actually interested in the overall temperature change throughout the fluid region.(green pipe in the geometry)


2. I have made these hot rectangles heat sources using fvOptions. I am attaching my fvOptions file also. And I think the distribution of heat sources is constant.



3. To be honest, I didn't check my Reynolds number (Re) because I don't know much about it. I know the formula for that, but don't know what impact it has on my simulation.


4. At inlet, I have flow rate (1 litre per minute) and temperature and velocity (optional).
at outlet, I have no requirement of parameters.



Hope, I answered your questions, if NOT, then please let me know, I would be happy to answer.


Thank you

Code:
FoamFile
{
    version     2.0;
    format      ascii;
    class       dictionary;
    location    "constant";
    object      fvOptions;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

heatSource
{
    type            scalarSemiImplicitSource;
    active          true;
 
    scalarSemiImplicitSourceCoeffs
    {
        selectionMode   all; // all, cellSet, cellZone, points
       // cellZone        hot;        
        //cellSet         c1;
        volumeMode      specific; // absolute;
        injectionRateSuSp
        {
            h     (9e6 0);
        }
    }
}
Attached Images
File Type: jpg outside_box.jpg (87.1 KB, 39 views)
File Type: jpg inside_geometry.jpg (44.4 KB, 35 views)
Raza Javed is offline   Reply With Quote

Old   May 21, 2019, 09:30
Default
  #19
Senior Member
 
Raza Javed
Join Date: Apr 2019
Location: Germany
Posts: 183
Rep Power: 7
Raza Javed is on a distinguished road
Quote:
Originally Posted by alexeym View Post
Hi,

OK. Let's start from the very beginning. Forget about boundary conditions for a minute. Describe your process.

You have a flow inside a tube. You have a liquid with constant temperature are one end (inlet). There are heat sources outside the tube.

So the following questions should be addressed BEFORE any further discussion about suitable boundary conditions:
- Are you interested in temperature distribution inside pipe itself?
- What is your Re?
- Is distribution of the external heat sources constant?
- What flow parameters you have at the inlet? What information you have at the outlet?

Hi..


I have studied about Reynolds number, and according to my fluid region my Reynolds number is less than 2300 which indicates that it is laminar flow.


Now, this situation rises a question in my mind, that is it possible to have Laminar flow in this type of fluid geometry?


Thank you
Raza Javed is offline   Reply With Quote

Old   May 22, 2019, 16:01
Default
  #20
Senior Member
 
Alexey Matveichev
Join Date: Aug 2011
Location: Nancy, France
Posts: 1,938
Rep Power: 39
alexeym has a spectacular aura aboutalexeym has a spectacular aura about
Send a message via Skype™ to alexeym
OK. We can simulate flow inside the tube as a flow of incompressible fluid. You can simulate is as a laminar flow to start with something (also for turbulence you need better mesh).

On your figure there are three regions: tube, heaters, everything else. What is "everything else" (white area on your figure)? What is the mechanism of heat exchange between the heaters and the tube?

Concerning inlet and outlet boundary conditions for the tube. For inlet you have a set of fixed values for temperature and velocity. At the outlet you assume, that flow is not disturbed, so values at the outlet faces (for temperature and velocity), should be equal to internal values, hence, it should be zero gradient. For the pressure it is vice-versa, as you know, there is no additional pressure at the outlet.

The most interesting part is boundary conditions between your domains. And they depend on the physical processes there. So, what are the processes, that take place at the boundaries between domains?
alexeym is offline   Reply With Quote

Reply

Tags
chtmultiregionsimpefoam, fluid, openfoam, pipe

Thread Tools Search this Thread
Search this Thread:

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Pulsatile flow at inlet of pipe model amsys CFX 5 July 20, 2016 13:18
Unable to input fluid to flow in a hollow pipe Mrsimple CFD Freelancers 3 March 22, 2016 05:18
[snappyHexMesh] Pipe flow / Internal fluid dynamics with SnappyHexMesh denner OpenFOAM Meshing & Mesh Conversion 3 October 13, 2011 09:24
My Revised "Time Vs Energy" Article For Review Abhi Main CFD Forum 2 July 9, 2002 09:08
Terrible Mistake In Fluid Dynamics History Abhi Main CFD Forum 12 July 8, 2002 09:11


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