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

Applying a retarding shear in a row of cells for incompressible flows

Register Blogs Community New Posts Updated Threads Search

 
 
LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
Old   November 20, 2023, 03:56
Default Applying a retarding shear in a row of cells for incompressible flows
  #1
Member
 
Marķa Rosales
Join Date: Mar 2023
Location: Spain
Posts: 35
Rep Power: 3
MMRC is on a distinguished road
Hello community,
Can you please give me your opinion in this implementation of 'retarding shear stress' proposed by Richard & Hoxey (1993) in the row of cells adyacent to wall that helps to minimize the over production of TKE and so the peak of TKE when plotting against vertical profile: shear = rho * (u_friction)²
I'm running simpleFoam, must I remove or keep rho (density) in the calculation of the source?
By using topoSetDict we can catch the first row of cells adyacent to ground patch (wall): first patchToFace and then setToCellZone.

Then, by using fvOptions codedVectorSource:
PHP Code:
retardingShear{    type            vectorCodedSource;    selectionMode   cellZone;    cellZone        areaSet;  // name of my cellZone    fields          (U);    writeToFile     true;    name            retardingShear;        codeCorrect        #{        #};    codeConstrain    #{    #};        codeInclude        #{        #};    codeAddSup            #{                vectorField& retardingShear = eqn.source();  // will asign calculation to source side of fvMatrix         vector Ufriction (-0.57 0 0); // is the friction velocity near wall         vector diskRetardingShear (-1 0 0); // is the direction opposite to normal wind flow                const labelList& cellIDs = cells();                forAll(cellIDs, i)                {                    label cellI = cellIDs[i];                            retardingShear[cellI] += mag(Ufriction)*diskRetardingShear; // the left side with += is thought to be 'a sink', AND the right side is the value of shear with its current direction                }} 
Is it good practice to combine '+=' (sink assigment) with the current direction of this retarding shear ?
I've seen that some user multiplies the sources term by cell volumes, when is this needed?
I apologize but I lost the original code and this code is what I remember that I could run.
Any ideas are welcome

Last edited by MMRC; November 20, 2023 at 05:13.
MMRC is offline   Reply With Quote

 

Tags
fvoption, shear stress, sources


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
Calculating source term total cell-zone volume parallel computation RobV Fluent UDF and Scheme Programming 2 May 30, 2022 03:46
[snappyHexMesh] snappyHexMesh does not detect highly skewed faces? ptpacheco OpenFOAM Meshing & Mesh Conversion 1 January 4, 2022 12:37
cellZone not taking all the cells inside rahulksoni OpenFOAM Running, Solving & CFD 6 January 25, 2019 00:11
cellZone not taking all the cells inside rahulksoni OpenFOAM 0 January 16, 2019 01:16
shear force applying Danial1992 FLUENT 0 May 23, 2017 03:19


All times are GMT -4. The time now is 09:31.