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

Shear-Rate calculation

Register Blogs Community New Posts Updated Threads Search

 
 
LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
Old   April 21, 2022, 07:53
Default Shear-Rate calculation
  #1
New Member
 
Giancarlo Esposito
Join Date: Mar 2022
Posts: 7
Rep Power: 4
giano is on a distinguished road
Hi everyone, I am trying to calculate the Shear rate, defined as the square root of the double dot product of the strain-rate tensor with itself. In order to do so I added the following lines of code to the createFields.H of the solver I am currently using:


Code:
Info<< "Reading field strainRate\n" << endl;
volScalarField strainRate
(
    IOobject
    (
        "strainRate",
        runTime.timeName(),
        mesh,
        IOobject::MUST_READ,
        IOobject::AUTO_WRITE
    ),
    1.41421356237*mag(symm(fvc::grad(U)))
);

The solver can be compiled and it run correctly, but the results of the new function are pratically 0 eveyrwhere. If I explore the folders corresponding to the time steps, what I found in the file is:


Code:
/*--------------------------------*- C++ -*----------------------------------*\
  =========                 |
  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
   \\    /   O peration     | Website:  https://openfoam.org
    \\  /    A nd           | Version:  7
     \\/     M anipulation  |
\*---------------------------------------------------------------------------*/
FoamFile
{
    version     2.0;
    format      binary;
    class       volScalarField;
    location    "0.1";
    object      strainRate;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

dimensions      [0 0 -1 0 0 0 0];

internalField   uniform 0;

boundaryField
{
    leftWall
    {
        type            calculated;
        value           uniform 0;
    }
    rightWall
    {
        type            calculated;
        value           uniform 0;
    }
    lowerWall
    {
        type            calculated;
        value           uniform 0;
    }
    atmosphere
    {
        type            calculated;
        value           uniform 0;
    }
    defaultFaces
    {
        type            empty;
    }
}


// ************************************************************************* //

So it basically performs the computation on the initial velocity field (U=0 everywhere).
Can someone help me?


Thanks in advance.
giano is offline   Reply With Quote

 


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
Wrong shear rate result with the existing code ALBATTROSS OpenFOAM Programming & Development 2 April 25, 2022 14:22
Shear strain rate insertion at Bingham plastic model Rubel Ahammed Main CFD Forum 0 May 9, 2020 07:00
What is wall shear stress and shear strain rate? warlocklw Main CFD Forum 2 May 21, 2012 06:16
shear rate calculation Stephane bone Siemens 2 January 7, 2005 11:34
Shear Strain Rate Cui CFX 0 August 5, 2003 12:47


All times are GMT -4. The time now is 06:59.