|
[Sponsors] |
March 28, 2019, 06:33 |
Implicit term in the continuity equation
|
#1 |
New Member
Join Date: Jun 2015
Posts: 16
Rep Power: 11 |
Hello everyone,
I'm trying to use a continuity equation in chtMultiRegionFoam that looks like it (similarly to the one used in cavitatingFoam): Code:
fvScalarMatrix rhoEqn ( fvm::ddt(rho) + fvm::div(phi2, rho) == fvOptions(rho) ); which basically has the second term implicit instead of explicit like in normal heat transfer solvers. I get this known problem: Code:
valueInternalCoeffs cannot be called for a calculatedFvPatchField on patch ... You are probably trying to solve for a field with a default boundary condition I know this comes out if you set "calculated" b.c. type but I think mine should be fine: in the 0 folder: Code:
dimensions [1 -3 0 0 0 0 0]; internalField uniform 147; boundaryField { ".*" { type zeroGradient; } } In the fluid part changeDictionary: Code:
rho { internalField uniform 147; boundaryField { ".*" { type zeroGradient; value uniform 147; } } } does anyone have any idea? thanks a lot |
|
March 28, 2019, 07:37 |
|
#2 |
Super Moderator
Tobias Holzmann
Join Date: Oct 2010
Location: Bad Wörishofen
Posts: 2,711
Blog Entries: 6
Rep Power: 52 |
Hi,
the density field should be set automatically to calculated as the boundary values are "calculated" from other values. It is not a field like a passive scalar and I don´t think that your density field has zeroGradient patch types - even though you defined it. To check it, just plot rho before your continuity equation. Furthermore, your equation is a transport equation and not a continuity equation: This equation looks more like an incompressible transport equation for the density.
__________________
Keep foaming, Tobias Holzmann |
|
March 28, 2019, 08:56 |
|
#3 |
New Member
Join Date: Jun 2015
Posts: 16
Rep Power: 11 |
Hello Tobi,
thanks a lot for your reply. In reality phi2 is not equal to the definition of phi in heat transfer solvers (rho*U), but it is defined like: Code:
surfaceScalarField phi2 = (fvc::interpolate(HbyA) & mesh.Sf()) + rhorAUf*fvc::ddtCorr(U, linearInterpolate(U) & mesh.Sf()) - rhorAUf*mesh.magSf()*fvc::snGrad(p_rgh)/rhof; Also, the initialization of rho in cavitatingFoam's tutorials is similar to mine: Code:
dimensions [1 -3 0 0 0]; internalField uniform 845; boundaryField { inlet { type fixedValue; value uniform 845; } outlet { type fixedValue; value uniform 835; } walls { type zeroGradient; } frontBack { type zeroGradient; } } thanks |
|
March 29, 2019, 14:07 |
|
#4 | |
Senior Member
Michael Alletto
Join Date: Jun 2018
Location: Bremen
Posts: 616
Rep Power: 16 |
Quote:
|
||
Tags |
boundary condition, chtmultiregionfoam, continuity equation, implicit explicit |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
courant number increases to rather large values | 6863523 | OpenFOAM Running, Solving & CFD | 22 | July 6, 2023 00:48 |
Domain Reference Pressure and mass flow inlet boundary | AdidaKK | CFX | 75 | August 20, 2018 06:37 |
pimpleDyMFoam computation randomly stops | babapeti | OpenFOAM Running, Solving & CFD | 5 | January 24, 2018 06:28 |
Stuck in a Rut- interDyMFoam! | xoitx | OpenFOAM Running, Solving & CFD | 14 | March 25, 2016 08:09 |
Floating point exception error | lpz_michele | OpenFOAM Running, Solving & CFD | 53 | October 19, 2015 03:50 |