
[Sponsors] 
How to add source term and material derivative of log(T) in openFaom. 

LinkBack  Thread Tools  Search this Thread  Display Modes 
January 26, 2021, 08:13 
How to add source term and material derivative of log(T) in openFaom.

#1 
Member
idrees khan
Join Date: Jun 2019
Posts: 36
Rep Power: 6 
Hi Dear's
I'm adding nonisothermal OldroydB model to viscoelasticFluidFaom solver the stress equation(using OldroydB model) for isothermal case is like so, Code:
// Stress transport equation fvSymmTensorMatrix tauEqn ( fvm::ddt(tau_) + fvm::div(phi(), tau_) == etaP/lambda*twoD + twoSymm(C)  fvm::Sp(1/lambda, tau_) ); tauEqn.solve(); } But for nonisothermal case in the stress equation Code:
// WLF to update viscosities for temperature dependence volScalarField lambda = Foam::exp( C11_*(T  To_) / (C21_ + T  To_) )*lambda_; volScalarField etaP = Foam::exp( C11_*(T  To_) / (C21_ + T  To_) )*etaP_; Code:
lambda*tua_*D(log(T))/Dt my question is how to define it in openFoam term Code:
lambda*tua_*D(log(T)/Dt if i define it like Code:
volScalarField logT = log(T); Code:
// material derivative term of log(T) in multiplication with tau_ fvc::ddt(tau_/lambda,logT) +fvc::div(phi()*tau_,logT/lambda) Code:
fvc::div(phi()*tau_,logT), if define like so Code:
volScalarField logT = log(T); Code:
tau_*fvc::ddt(1/lambda,logT) + tau_*fvc::div(phi(),logT/lambda) but give me and error when I'm running the solver saying Code:
argument of transcendental function is not dimensionless Code:
volScalarField logT = log(T); what i'm thinking just like we define material derivative in momentum eqaution i.e DU/Dt which is wrtten in openFaom Code:
fvm::ddt(U) +fvm::phi ,U) so I'm applying the same track for Code:
lambda*tua_*D(log(T)/Dt source term Code:
F=g*Cb(T  To) i write Code:
fvm::Sp(g*Cb, T)  g*Cb*To or fvc::Sp(g*Cb, T)  g*Cb*To and simply (g*Cb(T  To)) regards idrees 

January 27, 2021, 14:32 

#2 
Senior Member

Hi,
1. There is fvc::DDt(phi, Field). Here is a link to Foundation's documentation (fvc::DDt), guess, foamextend has something similar. 2. To use T in log, T should be dimensionless. Either divide the field by 1K, or do something more appropriate. 3. Error screenshot is irrelevant. Post simple text of the whole error. But it seems, you have tried to add different types of fields (ex. vector and tensor). 

Thread Tools  Search this Thread 
Display Modes  


Similar Threads  
Thread  Thread Starter  Forum  Replies  Last Post 
how to Add the material derivative of log(T) in the constitutive equation's.  idrees khan  OpenFOAM Programming & Development  5  January 21, 2021 07:57 
curvature correction term, material derivative of a tensor  volker  OpenFOAM Programming & Development  7  June 3, 2010 08:08 
UDF Scalar Code: HT 1  Greg Perkins  FLUENT  8  October 20, 2000 12:40 
UDFs for Scalar Eqn  Fluid/Solid HT  Greg Perkins  FLUENT  0  October 13, 2000 23:03 
UDFs for Scalar Eqn  Fluid/Solid HT  Greg Perkins  FLUENT  0  October 11, 2000 03:43 