|
[Sponsors] |
Modifying TEqn.H to access and use the U field |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
January 19, 2021, 14:14 |
Modifying TEqn.H to access and use the U field
|
#1 |
Member
J.D. Wilson
Join Date: Nov 2020
Location: Edmonton, Canada
Posts: 34
Rep Power: 6 |
I'm creating a slightly modified solver based on buoyantBoussinesqPimpleFoam. What I want to do is modify TEqn.H by adding a term that (implicitly) represents vertical advection of a background temperature gradient, say, - w dT0/dz. The idea is to look at the effect of stratification on a weak, buoyancy-driven flow. I have been guided by, and tried to follow along with, these helpful forum entries:
https://openfoamwiki.net/index.php/HowTo_Add_a_Coriolis_Force_And_Make_a_Tornado http://https://www.cfd-online.com/Fo...-equation.html In transportProperties I define the background temperature gradient, e.g. Code:
gradT0 [0 -1 0 1 0 0 0] (0.0 0.0 0.1) Code:
dimensionedVector gradT0 ( "gradT0", dimensionSet(0,-1,0,1,0,0,0), laminarTransport ); Code:
fvScalarMatrix TEqn ( fvm::ddt(T) + fvm::div(phi, T) - fvm::laplacian(alphaEff, T) == radiation->ST(rhoCpRef, T) + fvOptions(T) - U & gradT0 ); Code:
TEqn.H:28:9: note: mismatched types ‘Foam::DimensionedField<Type, Foam::volMesh>’ and ‘Foam::fvMatrix<double>’ - U & gradT0 Last edited by JayDeeUU; January 19, 2021 at 14:25. Reason: Clarification |
|
|
|