|
[Sponsors] |
Variable conductivity and van Driest wall functions |
![]() |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
![]() |
![]() |
#1 |
New Member
Andy
Join Date: Aug 2015
Posts: 8
Rep Power: 11 ![]() |
Hello,
I have to implement a variable conductivity between 2D parallel plates such as: ![]() where there is the van Driest type wall function: ![]() ![]() 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)? Code:
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. |
|
![]() |
![]() |
![]() |
Tags |
van driest, variable conductivity, wall functions |
|
|