|
[Sponsors] |
July 30, 2018, 02:52 |
Viscous Work in rhoPimpleFoam (OF 1612)
|
#1 |
New Member
Lars Wein
Join Date: Jun 2012
Posts: 8
Rep Power: 14 |
Hi,
I'm using rhoPimpleFOAM in OpenFOAM V1612 and I need to implement the viscous work term in the energy equation. Currently my implementation in the EEqn.h looks like: Code:
{ volScalarField& he = thermo.he(); volScalarField muEff ("muEff", turbulence->muEff()); volTensorField gradU = fvc::grad(U); volTensorField tau = - muEff * (gradU + gradU.T()) + (2.0/3.0 * muEff * fvc::div(U)) * I; volScalarField tauGradU = tau && gradU; fvScalarMatrix EEqn ( fvm::ddt(rho, he) + fvm::div(phi, he) + fvc::ddt(rho, K) + fvc::div(phi, K) + ( he.name() == "e" ? fvc::div ( fvc::absolute(phi/fvc::interpolate(rho), U), p, "div(phiv,p)" ) : -dpdt ) - fvm::laplacian(turbulence->alphaEff(), he) - tauGradU == fvOptions(rho, he) ); EEqn.relax(); fvOptions.constrain(EEqn); EEqn.solve(); fvOptions.correct(he); thermo.correct(); } Code:
--> FOAM FATAL ERROR: lookup of grad(U) from objectRegistry region0 successful but it is not a surfaceScalarField, it is a volTensorField From function const Type& Foam::objectRegistry::lookupObject(const Foam::word&, bool) const [with Type = Foam::GeometricField<double, Foam::fvsPatchField, Foam::surfaceMesh>] in file /sw/eng/OpenFOAM/v1612+/GNU_MPP/OpenFOAM-v1612+/src/OpenFOAM/lnInclude/objectRegistryTemplates.C at line 206. FOAM aborting |
|
August 1, 2018, 11:56 |
Work-Arround
|
#2 |
New Member
Lars Wein
Join Date: Jun 2012
Posts: 8
Rep Power: 14 |
I have found a work-arround on my own. Incase anybody is facing the same issue in OpenFOAM 1612, here is my solution:
In OpenFOAM 1806 viscous work can be included into the energy equation via an additional source (in fvOptions). See https://www.openfoam.com/documentati...661e05c65.html So, I just copied the corresponding files, viscousDissipation.C and .H to my FOAM_USER_LIBBIN and compiled it for OpenFOAM 1612. Kind regards |
|
Tags |
rhopimplefoam, viscous work |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Viscous resistance coefficients in porous medium | fpingqian | FLUENT | 50 | June 26, 2019 02:55 |
Pressure stair-step behaviour using rhopimplefoam | joegi.geo | OpenFOAM Running, Solving & CFD | 3 | December 12, 2014 13:10 |
rhoPimpleFoam floating point error | dancfd | OpenFOAM Running, Solving & CFD | 6 | January 5, 2014 21:57 |
Linearization of viscous flux in discontinuous Galerkin finite element methods | yidongxia | Main CFD Forum | 1 | November 17, 2011 13:11 |
Include Viscous Work term (in fluid model) | mehshan.javaid | Main CFD Forum | 0 | September 22, 2011 11:43 |