|
[Sponsors] |
September 23, 2020, 17:16 |
Linearized Navier Stokes Solver
|
#1 |
New Member
Join Date: Sep 2020
Posts: 9
Rep Power: 5 |
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 19:19. |
|
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 00:01 |
thobois class engineTopoChangerMesh error | Peter_600 | OpenFOAM | 4 | August 2, 2014 09:52 |
Navier Stokes Solver | Khan | Main CFD Forum | 2 | December 12, 2006 09:41 |
ILU for Navier stokes problems | Raju | Main CFD Forum | 5 | July 29, 2006 14:15 |
help: I am trying to solve Navier Stokes compressible and viscid flow | Jose Choy | Main CFD Forum | 2 | May 18, 2000 05:45 |