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

Openfoam 10/11 - Non-Newtonian Fluid setup

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   February 12, 2024, 12:20
Default Openfoam 10/11 - Non-Newtonian Fluid setup
  #1
New Member
 
Nidal
Join Date: Nov 2018
Posts: 17
Rep Power: 8
Nidalsb is on a distinguished road
Hi everyone,

I am struggling to setup a non-newtonian fluid within multiphaseInterFoam. It was straightforward before Openfoam 10 was released, were it was setup within transportProperties.

This new method where the non-newtonian model is setup within momentum transport is too confusing.

Can someone please help me figure it out. I found a tutorial implementing a non-newtonian fluid within pimpleFoam. But that also makes no sense as the viscosity model is set to "constant"

Here is what I have, it managed to run but I am not sure if the crossPowerLaw is applied.

MomentumTransport:

Code:
simulationType laminar;

laminar
{
    model               generalisedNewtonian;
    viscosityModel      CrossPowerLaw;
    CrossPowerLawCoeffs
    {
        nu0         [0 2 -1 0 0 0 0]  1-05;
        nuInf       [0 2 -1 0 0 0 0]  1E-12;
        m           [0 0 1 0 0 0 0]   1.00E-03;
        n           [0 0 0 0 0 0 0]   0.7;
    }
}
physicalProperties (Non-newtonian Fluid):

Code:
viscosityModel  constant;

rho           1000;
m             1.00E-03;
n             0.7;
nu            1E-05;
nuInf         1E-12;
I manage to run the simulation just fine with the following output, but I do not get any output from openfoam to show me the non-newtonian viscosity so I am not sure if that is even implemented:

Code:
PIMPLE: Operating solver in transient mode with 6 outer correctors


Reading field p_rgh

Reading field U

Reading/calculating face flux field phi

Selecting viscosity model Newtonian
Selecting viscosity model Newtonian
Selecting viscosity model constant
Selecting turbulence model type laminar
Selecting laminar stress model generalisedNewtonian
Selecting generalised Newtonian model CrossPowerLaw

Reading g

Reading hRef
Calculating field g.h

No MRF models present

No fvModels present
No fvConstraints present
I would appreciate any help, thank you!
Nidalsb is offline   Reply With Quote

Old   October 1, 2024, 10:11
Default
  #2
Member
 
Michael Sukham
Join Date: Mar 2020
Location: India
Posts: 84
Rep Power: 6
2538sukham is on a distinguished road
Quote:
Originally Posted by Nidalsb View Post
Hi everyone,

I am struggling to setup a non-newtonian fluid within multiphaseInterFoam. It was straightforward before Openfoam 10 was released, were it was setup within transportProperties.

This new method where the non-newtonian model is setup within momentum transport is too confusing.

Can someone please help me figure it out. I found a tutorial implementing a non-newtonian fluid within pimpleFoam. But that also makes no sense as the viscosity model is set to "constant"

Here is what I have, it managed to run but I am not sure if the crossPowerLaw is applied.

MomentumTransport:

Code:
simulationType laminar;

laminar
{
    model               generalisedNewtonian;
    viscosityModel      CrossPowerLaw;
    CrossPowerLawCoeffs
    {
        nu0         [0 2 -1 0 0 0 0]  1-05;
        nuInf       [0 2 -1 0 0 0 0]  1E-12;
        m           [0 0 1 0 0 0 0]   1.00E-03;
        n           [0 0 0 0 0 0 0]   0.7;
    }
}
physicalProperties (Non-newtonian Fluid):

Code:
viscosityModel  constant;

rho           1000;
m             1.00E-03;
n             0.7;
nu            1E-05;
nuInf         1E-12;
I manage to run the simulation just fine with the following output, but I do not get any output from openfoam to show me the non-newtonian viscosity so I am not sure if that is even implemented:

Code:
PIMPLE: Operating solver in transient mode with 6 outer correctors


Reading field p_rgh

Reading field U

Reading/calculating face flux field phi

Selecting viscosity model Newtonian
Selecting viscosity model Newtonian
Selecting viscosity model constant
Selecting turbulence model type laminar
Selecting laminar stress model generalisedNewtonian
Selecting generalised Newtonian model CrossPowerLaw

Reading g

Reading hRef
Calculating field g.h

No MRF models present

No fvModels present
No fvConstraints present
I would appreciate any help, thank you!
If you have found the solution, would you share it ? I wanted to use lambda thixotropic in interFoam type solver.
2538sukham is offline   Reply With Quote

Old   October 12, 2024, 11:10
Default
  #3
Member
 
Michael Sukham
Join Date: Mar 2020
Location: India
Posts: 84
Rep Power: 6
2538sukham is on a distinguished road
Ok. I think I got it. I have to momentumTransport.water and put the thixotropic model. Although I have to give entries for constant viscosity in physicalProperties. A bit confused here
2538sukham is offline   Reply With Quote

Old   October 13, 2024, 13:03
Default
  #4
New Member
 
Wesley T.
Join Date: Apr 2009
Posts: 28
Rep Power: 17
Wesley is on a distinguished road
Edited to add: a tutorial with a non-Newtonian fluid can be found in the OpenFOAM-12/tutorials/incompressibleVoF/climbingRod. I believe it is also in the same location for OF-10 and OF-11, but I have not confirmed this.



The setup for non-Newtonian fluids were not obvious to me, but after some work and finding the above tutorial, I now have some simulations running with non-Newtonian fluid models.

The file structure I ended up using when I was trying to simulate coextusion of 2 food materials looks like this:
.
├──
0
│ ├── alpha.ExtrudateA
│ ├── p_rgh
│ └── U
├── BasicCoExPipe.unv
├──
constant
│ ├── g
│ ├── momentumTransport
│ ├── momentumTransport.ExtrudateA
│ ├── momentumTransport.ExtrudateB
│ ├── phaseProperties
│ ├── physicalProperties.ExtrudateA
│ ├── physicalProperties.ExtrudateB
│ └──
polyMesh
│ ├── boundary
│ ├── faces
│ ├── neighbour
│ ├── owner
│ └── points
── system
├── controlDict
├── fvSchemes
└── fvSolution

As you mentioned, there needs to be a value for nu in the physicalProperties, but my testing shows that what that value is does not matter to the result if there is a momentumTransport file defining the non-newtonian fluid properties.

Information in my physicalProperties.ExtrudateA is shown below:

Code:
FoamFile
{
    format      ascii;
    class       dictionary;
    location    "constant";
    object      physicalProperties.ExtrudateA;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

viscosityModel  constant;
nu              1.64e-3;
 rho             1250;
The information in my momentumTransport.ExtrudateA is shown below

Code:
 FoamFile
{
    format      ascii;
    class       dictionary;
    location    "constant";
    object      momentumTransport.ExtrudateA;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

simulationType  laminar;

laminar
{
    model        generalisedNewtonian;

    viscosityModel powerLaw;

    nuMax           1000000;
    nuMin              0.1;
    k               3000;
    n               0.4;
}
I have found this works for for the incompressibleFluid solver (I use this for single phase steadystate simulations) and for the incompressibleVoF solver (I use this for two-phase transient simulations).

I have not been able to get non-Newtonian fluids working for the incompressibleMultiphaseVoF solver yet. That solver seems to use the information from the physicalProperties files, despite having the same non-Newtonian properties as above in the momentumTransport files.

I hope this information is helpful. If my answer is not clear enough, please let me know and I will try to correct any gaps in the details that may be helpful to you.

Wesley

Last edited by Wesley; October 13, 2024 at 13:11. Reason: Added a reference to a tutorial using a non-Newtonian fluid model
Wesley is offline   Reply With Quote

Old   October 13, 2024, 13:08
Default
  #5
Member
 
Michael Sukham
Join Date: Mar 2020
Location: India
Posts: 84
Rep Power: 6
2538sukham is on a distinguished road
Yes. For me, I have the following
.
├── 0
│** ├── U
│** ├── alpha.water.orig
│** ├── lambda.water.orig
│** ├── lambdaThixotropic:lambda.water
│** └── p_rgh
├── Allclean
├── Allrun
├── constant
│** ├── g
│** ├── momentumTransport
│** ├── momentumTransport.air
│** ├── momentumTransport.water
│** ├── phaseProperties
│** ├── physicalProperties.air
│** └── physicalProperties.water
└── system
├── blockMeshDict
├── controlDict
├── fvSchemes
├── fvSolution
└── setFieldsDict

I am using incompressibleVoF (interFoam) and checked with damBreak case, the non-newtonian behavior is captured well. Thanks! I havent tried multiphaseVoF (multiphaseEulerFoam ??)
2538sukham is offline   Reply With Quote

Old   October 19, 2024, 11:08
Default
  #6
New Member
 
Wesley T.
Join Date: Apr 2009
Posts: 28
Rep Power: 17
Wesley is on a distinguished road
Quote:
Originally Posted by 2538sukham View Post
I am using incompressibleVoF (interFoam) and checked with damBreak case, the non-newtonian behavior is captured well. Thanks! I havent tried multiphaseVoF (multiphaseEulerFoam ??)
I am glad to read that interFoam is working for you.

If you try one of the multiphase solvers and get it to work, can you share file structure or files?

I recently installed OpenFOAM 9 as a docker image so I can run multiphase with powerLaw fluids. There is something I am not finding or understanding for how to run this with multiphase using non-Newtonian fluids in OpenFOAM 10/11/12.

If I get a multiphase non-Newtonian simulation running in OpenFOAM 12 (the version I currently use for other simulations), I will share it.


Thank you,

Wesley
Wesley is offline   Reply With Quote

Reply

Tags
multiphaseinterfoam, non-newtonian, openfoam10


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
Map of the OpenFOAM Forum - Understanding where to post your questions! wyldckat OpenFOAM 10 September 2, 2021 06:29
OpenFOAM v3.0.1 Training, London, Houston, Berlin, Jan-Mar 2016 cfd.direct OpenFOAM Announcements from Other Sources 0 January 5, 2016 04:18
OpenFOAM Training, London, Chicago, Munich, Sep-Oct 2015 cfd.direct OpenFOAM Announcements from Other Sources 2 August 31, 2015 14:36
Overflow Error in Multiphase Modelling with Two Continuous Fluids ashtonJ CFX 6 August 11, 2014 15:32
Terrible Mistake In Fluid Dynamics History Abhi Main CFD Forum 12 July 8, 2002 10:11


All times are GMT -4. The time now is 00:32.