CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM

Adding energy/Temprature equation to viscoelasticFluidFoam solver

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes
  • 1 Post By rtyme06

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   December 7, 2020, 11:19
Default Adding energy/Temprature equation to viscoelasticFluidFoam solver
  #1
Member
 
idrees khan
Join Date: Jun 2019
Posts: 36
Rep Power: 7
idrees khan is on a distinguished road
Dear foamer's


I'm trying to add the Temperature equation(screenshort of the eqaution from the paper is attached) to viscoelastiFluidFoam solver
when i add and compile it with "wmake' I'm getting errors(screenshort is attached).


please note that here solvent viscosity (etaS) polymeric viscosity (etaP) and relaxation time Lambda depinding upon temperature.


humble request kindly guide me.


IWhatsApp Image 2020-12-07 at 5.00.12 PM.jpg

Screenshot from 2020-12-07 10-00-11.jpg

Screenshot from 2020-11-11 12-27-33.jpg

regards
Idrees
idrees khan is offline   Reply With Quote

Old   December 10, 2020, 19:52
Default
  #2
New Member
 
raihan
Join Date: Feb 2015
Posts: 10
Rep Power: 11
rtyme06 is on a distinguished road
It's complaining about a mismatched type and coming from viscoelasticFluidFoam.C line 35. Can you share what that line is?
idrees khan likes this.
rtyme06 is offline   Reply With Quote

Old   December 11, 2020, 02:59
Default
  #3
Member
 
idrees khan
Join Date: Jun 2019
Posts: 36
Rep Power: 7
idrees khan is on a distinguished road
Quote:
Originally Posted by rtyme06 View Post
It's complaining about a mismatched type and coming from viscoelasticFluidFoam.C line 35. Can you share what that line is?
Dear raihan

Actually i add temp equation to a file name Teqn.H and add it to viscoelasticFluidFoam.C on line 35

so my equation of temp is





fvScalarMatrix TEqn
(
fvm::ddt(T)
+ fvm::div(phi,T)
- fvm::laplacian(DT,T)
- 1.0/rho/Cv * (gamma*visco.tau() && Foam::symm(fvc::grad(U))+ Foam::exp( -C11*(T - To) / (C21 + T - To) )*etaS* Foam::fvc::symm(grad(U))&& Foam::fvc::grad(U))
);

TEqn.relax();
TEqn.solve();


this is what given in the paper (screenshort is attached in previous msg).
there is also some other term which i've to add later.but I'm adding terms step by step.
regards
idrees
idrees khan is offline   Reply With Quote

Old   December 11, 2020, 17:46
Default
  #4
New Member
 
raihan
Join Date: Feb 2015
Posts: 10
Rep Power: 11
rtyme06 is on a distinguished road
Based on your error log and the equation, here is my advice for you. Simplify the temperature equation. Create new variables for the double dot product terms and use those variables in the equation. This way you know exactly which term is causing the problem.
rtyme06 is offline   Reply With Quote

Old   December 12, 2020, 05:00
Default
  #5
Member
 
idrees khan
Join Date: Jun 2019
Posts: 36
Rep Power: 7
idrees khan is on a distinguished road
Quote:
Originally Posted by rtyme06 View Post
Based on your error log and the equation, here is my advice for you. Simplify the temperature equation. Create new variables for the double dot product terms and use those variables in the equation. This way you know exactly which term is causing the problem.



Dear raihan.


fvScalarMatrix TEqn
(
fvm::ddt(T)
+ fvm::div(phi,T)
- fvm::laplacian(DT,T)
- 1.0/rho/Cv * (gamma*visco.tau() && Foam::symm(fvc::grad(U))+ (Foam::exp( -C11*(T - To) / (C21 + T - To) )*etaS*Foam::symm(fvc::grad(U)))&& Foam:fvc::grad(U)))
);

TEqn.relax();
TEqn.solve();


when i add and compile with "wmake" getting the same error's


after this i removed the term "&& Foam:fvc::grad(U)))" and compile with wmake it work.
i don't know why

Foam::symm(fvc::grad(U)) is scalar it should be tensor which is basically causing error.
regards
idrees
idrees khan is offline   Reply With Quote

Old   December 12, 2020, 18:46
Default
  #6
New Member
 
raihan
Join Date: Feb 2015
Posts: 10
Rep Power: 11
rtyme06 is on a distinguished road
I checked the symm() function. Looks like it returns volSymmTensorField rather than volTensorField. So that may be your problem.
//- Return the symmetric part of a tensor
template<class Cmpt>
inline SymmTensor<Cmpt> symm(const Tensor<Cmpt>& t)
{
return SymmTensor<Cmpt>
(
t.xx(), 0.5*(t.xy() + t.yx()), 0.5*(t.xz() + t.zx()),
t.yy(), 0.5*(t.yz() + t.zy()),
t.zz()
);
}

I guess the possible solution would be to simplify the steps, use additional variables, as I said before.
rtyme06 is offline   Reply With Quote

Reply

Tags
symm(), viscoelasticfluidfoam


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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Adding diffusion term to interFoam transport equation Gearb0x OpenFOAM Programming & Development 3 February 14, 2023 05:16
multiRegionHeater error ordinary OpenFOAM Running, Solving & CFD 2 June 9, 2020 18:43
Domain Reference Pressure and mass flow inlet boundary AdidaKK CFX 75 August 20, 2018 06:37
Problem with Velocity Poisson Equation and Vector Potential Poisson Equation mykkujinu2201 Main CFD Forum 1 August 12, 2017 14:15
Poisson equation in custom solver diverges for large boundary values babakflame OpenFOAM Running, Solving & CFD 2 May 23, 2017 21:11


All times are GMT -4. The time now is 11:46.