|
[Sponsors] |
Modeling Source Term in Continuity Equation (icoFoam solver) |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
July 5, 2020, 18:39 |
Modeling Source Term in Continuity Equation (icoFoam solver)
|
#1 |
New Member
Bruno
Join Date: Jul 2018
Posts: 6
Rep Power: 8 |
Hello,
I am modifying the icoFoam solver in the following way: Code:
fvScalarMatrix CEqn ( fvm::ddt(C) + fvm::div(phi,C) - fvm::laplacian (D,C) == fvm::Sp(-CTE_1,C) ); CEqn.solve(); fvVectorMatrix UEqn ( fvm::ddt(U) + fvm::div(phi,U) - fvm::laplacian(nu,U) == fvm::Sp(-CTE_2,U) ); if (piso.momentumPredictor()) { solve(UEqn == -fvc::grad(p)); } while (piso.correct()) { volScalarField rAU(1.0/UEqn.A()); volVectorField HbyA(constrainHbyA(rAU*UEqn.H(), U, p)); surfaceScalarField phiHbyA ( "phiHbyA", fvc::flux(HbyA) + fvc::interpolate(rAU)*fvc::ddtCorr(U, phi) ); adjustPhi(phiHbyA, U, p); constrainPressure(p, U, phiHbyA, rAU); while (piso.correctNonOrthogonal()) { fvScalarMatrix pEqn ( fvm::laplacian(rAU, p) == fvc::div(phiHbyA) - CTE_3*C ); pEqn.setReference(pRefCell, pRefValue); pEqn.solve(); if (piso.finalNonOrthogonalIter()) { phi = phiHbyA + pEqn.flux(); } } #include "continuityErrs.H" U = HbyA - rAU*fvc::grad(p); U.correctBoundaryConditions(); } |
|
Tags |
icofoam, source term |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Source Term due to evaporation in energy transport equation | styleworker | OpenFOAM Programming & Development | 3 | September 7, 2022 04:09 |
[swak4Foam] Installation Problem with OF 6 version | Aurel | OpenFOAM Community Contributions | 14 | November 18, 2020 17:18 |
[Other] How to use finite area method in official OpenFOAM 2.2.0? | Detian Liu | OpenFOAM Meshing & Mesh Conversion | 4 | November 3, 2015 04:04 |
[foam-extend.org] problem when installing foam-extend-1.6 | Thomas pan | OpenFOAM Installation | 7 | September 9, 2015 22:53 |
[swak4Foam] Error bulding swak4Foam | sfigato | OpenFOAM Community Contributions | 18 | August 22, 2013 13:41 |