https://linen.dev logo
Join Discord
Powered by
# les-ras
  • s

    shyamsparks

    04/10/2025, 7:10 AM
    Hi, can anyone please tell me how to extract Reynolds stress as an outcome from a simulation? I'm validating an experiment and couldn't figure out how to extract it. I'm using RANS K-epsilon and K-Omega SST turbulence models
  • y

    Yann

    04/10/2025, 7:29 AM
    This is a job for the ``turbulenceFields`` function object
  • y

    Yann

    04/10/2025, 7:29 AM
    https://doc.openfoam.com/2306/tools/post-processing/function-objects/field/turbulenceFields/
  • y

    Yann

    04/10/2025, 7:32 AM
    this is .com branch, but the same function exists in .org branch if this is what you are using. You might just want to check the documentation related to your version to make sure you use the proper syntax
  • s

    shyamsparks

    04/10/2025, 8:23 AM
    Thank you for this, I understand it is a function object, but I'm not familiar with .org and .com branch, if you don't mind can you please explain what it is? I'm using OpenFOAM v2406
  • s

    shyamsparks

    04/10/2025, 8:28 AM
    I'll take a look at this now and update you
  • y

    Yann

    04/10/2025, 9:01 AM
    OpenFOAM-v2406 is the OpenCFD branch (openfoam.com)
  • y

    Yann

    04/10/2025, 9:04 AM
    My link is the right one for you
  • y

    Yann

    04/10/2025, 9:04 AM
    The other development branch is the OpenFOAM foundation branch (openfoam.org), currently at OpenFOAM-12
  • s

    shyamsparks

    04/10/2025, 10:31 AM
    Ohh okay, that's new for me to know that there are 2 versions. It seems like I'm working on .com branch
  • y

    Yann

    04/10/2025, 10:35 AM
    yep, you do!
  • y

    Yann

    04/10/2025, 10:38 AM
    Actually there is a 3rd branch... But I might summon the mighty hardcore users if I say it aloud 😱
  • s

    shyamsparks

    04/10/2025, 10:42 AM
    Ohh, is that so😅. I better take baby steps
  • s

    shyamsparks

    04/10/2025, 12:52 PM
    Is outputing "R" a space consuming thing? I had like 50 GB of space and my simulation ran only for 50 iterations and my machine went out of storage. without that, it would take only upto 20 GB of space for 500 iterations. or am I missing something?
  • q

    qr

    04/10/2025, 12:53 PM
    One R value has 6 scalar variables in it.
  • y

    Yann

    04/10/2025, 2:16 PM
    yep, R is pretty big as qr said
  • y

    Yann

    04/10/2025, 2:19 PM
    You might want to reduce the amount of data you write to disk by either changing the write intervals, or use purgeWrite to remove older iterations since you are doing RANS
  • s

    shyamsparks

    04/10/2025, 2:53 PM
    Ohh shoot🙃
  • s

    shyamsparks

    04/10/2025, 2:55 PM
    I understood the first part of changing write intervals. However, I'm not aware of purgeWrite. can you please tell me what it is exactly?
  • y

    Yann

    04/10/2025, 2:58 PM
    It's a parameter in controlDict to remove older iterations data after writing new one
  • y

    Yann

    04/10/2025, 2:59 PM
    for instance setting ``purgeWrite 2;`` will save only 2 iterations saved to disk. Each time a new one is saved, the oldest one is removed
  • y

    Yann

    04/10/2025, 2:59 PM
    https://www.openfoam.com/documentation/user-guide/6-solving/6.1-time-and-data-inputoutput-control
  • s

    shyamsparks

    04/10/2025, 3:04 PM
    Ohh okay, if I run the simulation for 500 iterations, then as you mentioned if
    purgeWrite 2
    then the final outputs will be the data of 499 and the 500th iteration. Am I correct?
  • y

    Yann

    04/10/2025, 3:06 PM
    yep
  • s

    shyamsparks

    04/10/2025, 3:06 PM
    Ohh that's nice. Thank you very much for the explanation
  • s

    shyamsparks

    04/14/2025, 7:57 AM
    I calculated 'R' using the turbulence fields object and now I want to plot the
    Reynold's shear stress
    . Can you please tell me how to do that? When I searched it in google it showed something called
    UPrime2mean
    and we have to use it to estimate it and I don't understand how it works
  • s

    shyamsparks

    04/14/2025, 8:00 AM
    Is
    UPrime2mean
    an another function object?
  • y

    Yann

    04/14/2025, 8:05 AM
    yep, you can compute it with the ``fieldAverage`` function object
  • s

    shyamsparks

    04/14/2025, 8:25 AM
    Ohh okay, found it. Thanks. will it calculate the Reynolds shear stress directly or do we need to do something else in the process
  • s

    shyamsparks

    04/17/2025, 12:14 PM
    When I estimated both
    UPrime2Mean and Reynolds Stress Tensor 'R'
    using FOs, Paraview automatically provided the reynold's shear stress at respective planes https://cdn.discordapp.com/attachments/598785402391887872/1362400786994303088/image.png?ex=6802421b&is=6800f09b&hm=71b0fd7e4b3d778344a307b8ae2ed4f0fcdddbad648ca875171544c8e2f70759&