|
[Sponsors] |
Wrong shear rate result with the existing code |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
October 17, 2018, 23:31 |
Wrong shear rate result with the existing code
|
#1 |
New Member
Amir
Join Date: Oct 2018
Posts: 17
Rep Power: 8 |
Hello all,
I'm working on problem in which knowing the magnitude of shear rate tensor is important to me. I added these lines to createFields.H file in solver's folder (buoyantBoussinesqPimpleFoam) and recompiled it in order to have the shear rate magnitude in each time step: Code:
volScalarField shearRate ( IOobject ( "shearRate", runTime.timeName(), mesh, IOobject::NO_READ, IOobject::AUTO_WRITE ), sqrt(2.0f)*mag(symm(fvc::grad(U))) ); is anything wrong with this expression: shearRate=sqrt(2.0f)*mag(symm(fvc::grad(U))) or it's a programming problem? Thank you is advance! Amir |
|
April 21, 2022, 08:45 |
|
#2 |
New Member
Giancarlo Esposito
Join Date: Mar 2022
Posts: 7
Rep Power: 4 |
I have the same problem, but so far I did not manage to solve it.
|
|
April 25, 2022, 15:22 |
|
#3 |
Member
Kellis
Join Date: Mar 2017
Posts: 39
Rep Power: 9 |
Amir,
The createFields.H file is only called once, at the beginning of the simulation. Assuming you are starting with a zero or otherwise uniform velocity field, the shear rate will be zero. If you are not updating the shear rate somewhere else in the code, the shear rate will be initialized in createFields and then never updated as the simulation progresses. To fix this, simply add another line of code (perhaps at the end of pEqn.H, once the velocity field for the timestep is finalized) to recalculate the shear rate with the updated velocity field. Then you should be seeing non-zero values as your case progresses. Hope this helps. Kellis |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
udf error | srihari | FLUENT | 1 | October 31, 2016 15:18 |
Blood and shear strain rate | Dave442 | CFX | 2 | July 27, 2012 07:10 |
Shear rate and Shear stress | kakarot9999 | FLUENT | 0 | September 8, 2011 09:28 |
Turbulent viscosity and shear rate | shib | FLUENT | 0 | June 22, 2010 13:44 |
Total shear rate in a 3 dimensional flow | Bo Busk Jensen | Main CFD Forum | 3 | May 23, 2003 16:26 |