CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Programming & Development (https://www.cfd-online.com/Forums/openfoam-programming-development/)
-   -   how to Add the material derivative of log(T) in the constitutive equation's. (https://www.cfd-online.com/Forums/openfoam-programming-development/233283-how-add-material-derivative-log-t-constitutive-equations.html)

idrees khan January 20, 2021 06:15

how to Add the material derivative of log(T) in the constitutive equation's.
 
2 Attachment(s)
Hi Dear's.

I'm going to Add temperature Equation to viscoelasticFluidFoam solver.



there is a material derivative term of log(T) (screenshot of the equation is attached )in the constitutive equation(I.e in this case Olroyd-B)



kindly if any one could guide me how to write that term in OldoydB.C file.



I add it like


volScalarField logT = log(T);
fvm::ddt(tau_,logT) + fvc::div(phi()*tau_,logT)



but getting error like(screenshot is also attached)



viscoelasticLaws/Oldroyd-B/Oldroyd_B.C:124:27: error: no matching function for call to ‘ddt(Foam::volSymmTensorField&, Foam::volScalarField&)’
fvm::ddt(tau_,logT) + fvc::div(phi()*tau_,logT)





Note:I change to fvc and fvm respectively but getting same error's.



regards

Idrees khan

mAlletto January 20, 2021 11:19

In your code


Code:

fvm::ddt(tau_,logT) + fvc::div(phi()*tau_,logT)



you have a volTensorfield and a scalarField as argument to the function fvm::ddt(tau_,logT)


the error simple say that such a function does not exist. See the progammer guid what is available

bigphil January 21, 2021 05:55

To add to mAlletto's answer:

For explicit calculation of stress (or stress rate), you should use "fvc::" (explicit) operators, not "fvm::" (implicit) operators (which probably does not make sense).

idrees khan January 21, 2021 06:12

1 Attachment(s)
Quote:

Originally Posted by mAlletto (Post 793874)
In your code


Code:

fvm::ddt(tau_,logT) + fvc::div(phi()*tau_,logT)
you have a volTensorfield and a scalarField as argument to the function fvm::ddt(tau_,logT)


the error simple say that such a function does not exist. See the progammer guid what is available






Dear Alletto,

Sorry I studied about what you suggest me(here is screenshot) but I'm not getting well.
kindly if you could help me.

regards
idrees khan

idrees khan January 21, 2021 06:17

1 Attachment(s)
Quote:

Originally Posted by bigphil (Post 793975)
To add to mAlletto's answer:

For explicit calculation of stress (or stress rate), you should use "fvc::" (explicit) operators, not "fvm::" (implicit) operators (which probably does not make sense).


Dear Cardiff,
Sorry I try both but getting the error's (see the screenshot)

idrees khan January 21, 2021 07:57

Hi Dear's

Instead of adding



fvc::ddt(tau_, logT) + fvc::div( phi()*tau_ ,log)



I add the term in tauEqn like this


tau_*fvc::ddt(logT) + tau_*fvc::div(phi(),log)


and run with "wmake libso" now it compile successfully without any error's.
Regards
idrees khan


All times are GMT -4. The time now is 14:10.