CFD Online Logo CFD Online URL
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Programming & Development

Variable conductivity and van Driest wall functions

Register Blogs Members List Search Today's Posts Mark Forums Read

LinkBack Thread Tools Search this Thread Display Modes
Old   October 28, 2017, 17:20
Default Variable conductivity and van Driest wall functions
New Member
Join Date: Aug 2015
Posts: 8
Rep Power: 10
andy_pr is on a distinguished road

I have to implement a variable conductivity between 2D parallel plates such as:

k_d = C_t \rho_f C_f d_p u \ell

where there is the van Driest type wall function:

\ell = 1-exp[-y/(w d_p)] \ \ \ \ 0 \le y \le H/2

\ell = 1-exp[-(H-y)/(w d_p)] \ \ \ \ H/2 \le y \le H

So far I have added the code below to TEqn.H to solve a scalar transport equation. It seemed to work ok without the conditional statement, but when I introduce the if statement the error occurs in compilation:

/home/apr207/OpenFOAM/OpenFOAM-2.4.0/src/OpenFOAM/lnInclude/dimensionedType.C:593:6: note: template argument deduction/substitution failed:
In file included from porousSimpleEpsilonSquaredTemperatureConductivityF oam.C:73:0:
TEqn.H:33:32: note: ‘Foam::tmp<Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> >’ is not derived from ‘const Foam::dimensioned<Type>’
if(mesh.C().component(1) < 0.005)
I wondered:
* Is y = mesh.C().component(1)?
* How to set the conditional for y < 0.005?
* Is the x-component of velocity, u = mag(U)?
volScalarField kd
IOobject ( "kd", runTime.timeName(), mesh, IOobject::NO_READ, IOobject::AUTO_WRITE ), mesh, dimensionedScalar("zero",dimensionSet(1,1,-3,-1,0),0.0)
); volScalarField L (
IOobject ( "L", runTime.timeName(), mesh, IOobject::NO_READ, IOobject::AUTO_WRITE ), mesh, dimensionedScalar("zero",dimensionSet(0,0,0,0,0),0.0)
); if(mesh.C().component(1) < 0.005) { L=1.0-exp(-mesh.C().component(1)/(1.5*dp)); } else { L=1.0-exp(-(0.01-mesh.C().component(1))/(1.5*dp)); } kd=0.375*rhof*cpf*mag(U)*dp*L; fvScalarMatrix TEqn ( fvm::div(phi,T) == fvm::laplacian((kfe+kse+kd)/(rhof*cpf*eps),T,"laplacian(DT,T)") ); TEqn.relax(); TEqn.solve();

Last edited by andy_pr; October 29, 2017 at 05:10.
andy_pr is offline   Reply With Quote


van driest, variable conductivity, wall functions

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On

All times are GMT -4. The time now is 02:31.