|
[Sponsors] |
Adding energy/Temprature equation to viscoelasticFluidFoam solver |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
December 7, 2020, 11:19 |
Adding energy/Temprature equation to viscoelasticFluidFoam solver
|
#1 |
Member
idrees khan
Join Date: Jun 2019
Posts: 36
Rep Power: 7 |
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 |
|
December 10, 2020, 19:52 |
|
#2 |
New Member
raihan
Join Date: Feb 2015
Posts: 10
Rep Power: 11 |
It's complaining about a mismatched type and coming from viscoelasticFluidFoam.C line 35. Can you share what that line is?
|
|
December 11, 2020, 02:59 |
|
#3 | |
Member
idrees khan
Join Date: Jun 2019
Posts: 36
Rep Power: 7 |
Quote:
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 |
||
December 11, 2020, 17:46 |
|
#4 |
New Member
raihan
Join Date: Feb 2015
Posts: 10
Rep Power: 11 |
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.
|
|
December 12, 2020, 05:00 |
|
#5 | |
Member
idrees khan
Join Date: Jun 2019
Posts: 36
Rep Power: 7 |
Quote:
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 |
||
December 12, 2020, 18:46 |
|
#6 |
New Member
raihan
Join Date: Feb 2015
Posts: 10
Rep Power: 11 |
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. |
|
Tags |
symm(), viscoelasticfluidfoam |
|
|
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 |