|
[Sponsors] |
OpenFOAM-12 (.org) showing only 2 viscosity models |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
November 10, 2024, 19:47 |
OpenFOAM-12 (.org) showing only 2 viscosity models
|
#1 |
New Member
Nicholas Langbein
Join Date: Nov 2024
Posts: 14
Rep Power: 2 |
I want to apply BirdCarreau model with foamRun, but it shows the following error for Openfoam.org 12 version
How do i access all rheology models. Please help its really confusing in latest version 12 of foam due to major code base changes --> FOAM FATAL ERROR: Unknown viscosity model BirdCarreau Valid viscosity models are : 2 ( Newtonian constant ) From function static Foam::autoPtr<Foam::viscosityModel> Foam::viscosityModel::New(const Foam::fvMesh&, const Foam::word&) in file viscosityModels/viscosityModel/viscosityModelNew.C at line 58. |
|
November 11, 2024, 14:40 |
|
#2 |
New Member
Wesley T.
Join Date: Apr 2009
Posts: 28
Rep Power: 17 |
The file structure for OpenFOAM 12 has been a challenge for me to use.
The offsetCylinder tutorial (tutorials/incompressibleFluid/offsetCylinder) shows how to implement the CrossPowerLaw model. The physicalProperties file includes: viscosityModel constant; nu 0.01; the "constant" is important, the value for nu may not be important, but it needs to be present. "constant" tells OpenFOAM to look for different viscosity model in a momentumTransport file. The momentumTransport file includes these lines: simulationType laminar; laminar { model generalisedNewtonian; viscosityModel CrossPowerLaw; nuInf 10; m 0.4; n 3; } I have been able to run powerLaw models based on this. I do run into problems again when I am running incompressibleMultiphaseVoF models - I have not successfully implemented non-Newtonian models with that solver. p, li { white-space: pre-wrap; } Please let me know if this helps you, Wesley |
|
November 11, 2024, 18:48 |
|
#3 | |
New Member
Nicholas Langbein
Join Date: Nov 2024
Posts: 14
Rep Power: 2 |
Quote:
Yes Now it runs without error for incompressibleFluid solver, But as you said still i am facing problem for using in incompressibleVOF solver. is there any guide for using newly implemented library/modules solvers for OpenFOAM12. the navigation and usage is very challenging. |
||
November 11, 2024, 21:13 |
|
#4 | |
New Member
Wesley T.
Join Date: Apr 2009
Posts: 28
Rep Power: 17 |
Quote:
I have been using OpenFOAM to simulation materials used in extrusion, so my file names tend to focus on extrudates. The structure of the directory of the simulation is shown below: Code:
├── 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 ├── files.txt └── system ├── controlDict ├── fvSchemes └── fvSolution These are some of the files I think were least obvious to me. Please let me know if it would be helpful paste more of the file contents. alpha.ExtrudateA: Code:
/*--------------------------------*- C++ -*----------------------------------*\ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org \\ / A nd | Version: 11 \\/ M anipulation | \*---------------------------------------------------------------------------*/ // File was originally alpha.water.orig in incompressibleVoF/damBreak/damBreakLaminar FoamFile { format ascii; class volScalarField; location "0"; object alpha.ExtrudateA; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // dimensions [0 0 0 0 0 0 0]; internalField uniform 1; // This statement defines all fluid in the volume as this material (Extrudate1) boundaryField { Inlet1 { type fixedValue; value uniform 1; } // No inlets werew defined in the damBreakLaminar tutorial,the /incompressibleVoF/waterChannel/0 alpha.water.orig for inlet example // type fixedValue: is based on the inlet in the waterChannel tutorial // value uniform 1: appears to say the fluid entering is 100% this material (Extrudate1) Inlet2 { type fixedValue; value uniform 0; } // No inlets werew defined in the damBreakLaminar tutorial,the /incompressibleVoF/waterChannel/0 alpha.water.orig for inlet example // type fixedValue: is based on the inlet in the waterChannel tutorial // value uniform 0: appears to say the fluid entering is NOT this material (0% Extrudate1), so would be the other material (Extrudate2) Outlet { type zeroGradient; } // type is zeroGradient based on /incompressibleVoF/waterChannel/0 alpha.water. // No "value" is defined, the simulation seems to run without issue, maybe test adding that in the future Walls { type zeroGradient; } // Walls was based on the wall boundaries in the damBreakLaminar tutorial } // ************************************************************************* // Code:
FoamFile { format ascii; class dictionary; location "constant"; object physicalProperties.ExtrudateA; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // viscosityModel constant; nu 1.64e-3; rho 1250; // ************************************************************************* // // The viscosityModel is defined as "constant". The flow model and the values in the momentumTransport file define the rheology for the simulation // nu is arbitrary - it may not matter what value is used. // rho is the density of the fluid in kg/m^3 Code:
oamFile { format ascii; class dictionary; location "constant"; object phaseProperties; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // phases (ExtrudateA ExtrudateB); sigma 0.07; // "sigma is the surface tension coefficient" from: https://www.openfoam.com/documentation/guides/latest/api/classFoam_1_1surfaceTensionModel.html#ae7d6922bdebcdf8394d369b7eb0c76e3 // More information would be needed to set a suitable sigma for the surface tension between two food extrudates // ************************************************************************* // 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; } // The above lines define the simulation as laminar and defines the rheology - in this case as a power law fluid. //nuMax and nuMin are arbitrary numbers that are likely well beyond any values that will be seen in extrusion of food materials. //k is the consistency index, the value for k is a rough approximation of the consistency index for many food extrudates //n is the shear-thinning index. The initial value used for this simulation is Newtonian (n=1) to ensure convergence. After an initial result is reached, the simulation is rerun with the output of the Newtonian simulation is copied as the 0 directory for the shear-thinning simulation where n is changed to be 0.4, a typical value for the shear-thinning index of extruded food materials. // ************************************************************************* // Last edited by Wesley; November 11, 2024 at 21:15. Reason: Trying to get the tree showing file structure to display better |
||
November 14, 2024, 10:21 |
|
#5 |
New Member
Nicholas Langbein
Join Date: Nov 2024
Posts: 14
Rep Power: 2 |
@Wesley, Thanks a bunch for your detailed explanation.. you are a life-saver.
Unfortunately, I am still not able to get incompressibleVoF solver to work with 2 phases with non newtonian models. I followed the same folder structure. Still it simulates with nu constant value we provide. If possible could you share content of constant/momentumTransport file... because its the only variable i think. Else if its not too much and possible could you share your tar for case file for reference. Thanks in advance |
|
November 14, 2024, 21:16 |
|
#6 | |
New Member
Wesley T.
Join Date: Apr 2009
Posts: 28
Rep Power: 17 |
Quote:
Contents of momentumTransport: Code:
// This file started as momentumTransport from the OpenFOAM 11 tutorial in incompressibleVoF/damBreakLaminar/damBreak tutorial // The momentumTransport properties are found in the momentumTransport.XXX files (2 of them in this case) FoamFile { format ascii; class dictionary; location "constant"; object momentumTransport; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // simulationType twoPhaseTransport; // twoPhaseTransport tells the system to look for the rheology models in the two momentumTransport.XXX files // ************************************************************************* // I tend to put comments (lines starting with //) to remind me of what I may have had issues with and which tutorials the base files in my simulations came from. In this case, it looks like I may have had issues with not having twoPhaseTransport as the simulationType. Hopefully this gets your simulation working. Please let me know if this works, if not I will try to put the directory up as a .zip file. Wesley |
||
November 15, 2024, 08:12 |
|
#7 | |
New Member
Wesley T.
Join Date: Apr 2009
Posts: 28
Rep Power: 17 |
Quote:
NOTE: I am not able to include the geometry - the zipped file is too large. I will try to create a more coarse mesh at another time that I could upload. The basic geometry is a simple T, with the two inlets being at the top of the T (flowing toward each other), and the outlet is at the bottom. NOTE2: I am attaching a very coarse mesh, which may not show the results as well, but should run. You will need to apply the mesh to the simulation (ideasUnvToFoam). The simulation takes about 5 minutes to solve the more refined mesh (that I can't attach due to file size) on one core on my computer. I have the Newtonian viscosity set in both physicalProperties files as: Code:
viscosityModel constant; nu 1.64e-3; rho 1250; If you look at the last time in paraFoam after your run the simulation, you will see ExtrudateA (the fluid with the higher k) takes up most of the cross-section of the flow at the exit of the simulation. If the viscosity model in momentumTransport had not been read/used in the solution, then the cross section of the two flows would be equal because the viscosities were equal in the physicalProperties file. Please let me know if this is helpful. Wesley Last edited by Wesley; November 15, 2024 at 09:01. Reason: Forgot to attach file |
||
November 21, 2024, 19:25 |
|
#8 |
New Member
Nicholas Langbein
Join Date: Nov 2024
Posts: 14
Rep Power: 2 |
Apologies for late reply. Yes simulationType twoPhaseTransport; works, without this solver considers newtonian model. Thanks a bunch for your guidance.
|
|
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Film phase Change models in OpenFOAM 11 | Yassin-K | OpenFOAM Running, Solving & CFD | 6 | September 16, 2024 12:49 |
OpenFOAM v11 Released | CFDFoundation | OpenFOAM Announcements from OpenFOAM Foundation | 0 | July 11, 2023 06:34 |
how to call viscosity in openfoam Solver development | rishik686 | OpenFOAM Running, Solving & CFD | 0 | March 22, 2023 04:23 |
Research on the implementations of the subgrid scale models in OpenFOAM | fumiya | OpenFOAM | 9 | December 30, 2016 05:22 |
OpenFOAM v3.0+ ?? | SBusch | OpenFOAM | 22 | December 26, 2016 15:24 |