|
[Sponsors] |
September 23, 2020, 18:16 |
Linearized Navier Stokes Solver
|
#1 |
New Member
Join Date: Sep 2020
Posts: 9
Rep Power: 6 |
Dear members,
I am trying to implement a Linearized Navier-Stokes solver for incompressible fluids inside OpenFoam. I read some articles and discussions in the forum but I some concepts which are not clear to me. Knowing that the LNSE are: where is the equilibrium solution and U and p are the small perturbations from it. I wanted to modify the icoFoam.C solver in the following way: Code:
fvVectorMatrix UEqn ( fvm::ddt(U)- fvm::laplacian(nu, U)+ fvm::div(phi_zero, U)+ fvc::div(phi,U_zero) ); Code:
Info<< "Reading field U_zero\n" << endl; volVectorField U_zero ( IOobject ( "U_zero", runTime.constant(), mesh, IOobject::MUST_READ, IOobject::NO_WRITE ), mesh ); surfaceScalarField phi_zero ( IOobject ( "phi_zero", runTime.constant(), mesh, IOobject::READ_IF_PRESENT, IOobject::NO_WRITE ), //fvc::flux(U_zero) linearInterpolate(U_zero) & mesh.Sf() ); Code:
/*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: v1912 | | \\ / A nd | Website: www.openfoam.com | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile { version 2.0; format ascii; class volVectorField; location "0"; object U_zero; } dimensions [0 1 -1 0 0 0 0]; internalField nonuniform List<vector> 30000 ( . . . ) ; boundaryField { . . . } The solver compiles good and the simulation runs but the results I get are not the ones I expected. I do not understand whether there is something wrong in the code or there is a mistake in the initial and boundary conditions I set. Can somebody help me please? Thanks in advance, Andrea Last edited by AndreaCFD; September 23, 2020 at 20:19. |
|
September 25, 2020, 11:21 |
|
#2 |
New Member
shayan tanweer
Join Date: Oct 2016
Location: DELHI,INDIA
Posts: 4
Rep Power: 10 |
Your code seems to be right.
What boundary conditions did you use? |
|
September 28, 2020, 04:17 |
|
#3 |
Senior Member
|
Does pEqn.H require corresponding modification? The current implementation seems to solve for a non-physical pressure. The pressure-velocity coupling makes the model non-linear as is likely to affect the computed velocity field.
Does it make sense to modify scalarTransportFoam from a scalar field being convected (as currently the case) to a velocity field being convected. In this way the pressure field is no longer in your way. |
|
Tags |
linearized navier stokes |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Star cd es-ice solver error | ernarasimman | STAR-CD | 2 | September 12, 2014 01:01 |
thobois class engineTopoChangerMesh error | Peter_600 | OpenFOAM | 4 | August 2, 2014 10:52 |
Navier Stokes Solver | Khan | Main CFD Forum | 2 | December 12, 2006 10:41 |
ILU for Navier stokes problems | Raju | Main CFD Forum | 5 | July 29, 2006 15:15 |
help: I am trying to solve Navier Stokes compressible and viscid flow | Jose Choy | Main CFD Forum | 2 | May 18, 2000 06:45 |