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

    slopezcastano

    07/07/2020, 2:40 PM
    you do space averaging as postprocessing
  • s

    slopezcastano

    07/07/2020, 2:41 PM
    why do you want it to do space averages anyway?
  • a

    akshay11235

    07/07/2020, 2:41 PM
    That would mean saving the geometry at given time steps right?
  • a

    akshay11235

    07/07/2020, 2:41 PM
    To improve the statistical sample
  • s

    slopezcastano

    07/07/2020, 2:42 PM
    there is a functionObject in FOAM that averages fields in time for you
  • a

    akshay11235

    07/07/2020, 2:42 PM
    That's not a good solution since the wave boundary layer is about 2-5mm and the DNS resolution hits Million plus grid points for moderate Re_tau.
  • a

    akshay11235

    07/07/2020, 2:43 PM
    Without space averaging the results would require a large temporal length which is why I wanted to do that. Hence the space averages.
  • a

    akshay11235

    07/07/2020, 2:43 PM
    Hope that makes sense
  • s

    slopezcastano

    07/07/2020, 2:43 PM
    > @User Don't do this during run time, then your code will really get slow @User Anyway, to respond to your question, you can create coded functionObjects, which will be compiled during execution
  • s

    slopezcastano

    07/07/2020, 2:44 PM
    > > Without space averaging the results would require a large temporal length which is why I wanted to do that. Hence the space averages. > @User I think you havent undestood what I said: I'm not telling you to discard averaging in space, I'm telling you to do it AFTER you run your case.
  • s

    slopezcastano

    07/07/2020, 2:45 PM
    as post-processing
  • a

    akshay11235

    07/07/2020, 2:46 PM
    Oh no I understood you well. That would imply saving the domain at say every 0.5 s a minimum for a 2 s wave. That's just not a feasible solution. I would rather put this in the runtime and do it since I can use more processors and make it work. Does that make sense?
  • s

    slopezcastano

    07/07/2020, 2:49 PM
    > @User can you specify a time averaging window with a repeating period? I have an oscillating pressure gradient and would like to average at different wave phases in direction and time etc. @User Of course, check fieldAverage functionObject
  • s

    slopezcastano

    07/07/2020, 2:53 PM
    > Oh no I understood you well. That would imply saving the domain at say every 0.5 s a minimum for a 2 s wave. That's just not a feasible solution. I would rather put this in the runtime and do it since I can use more processors and make it work. Does that make sense? @User Better, I missed the part where you said you were PHASE averaging
  • s

    slopezcastano

    07/07/2020, 2:54 PM
    It's not as easy as doing loops, because openfoam, by design, is not aware that your mesh is structured
  • s

    slopezcastano

    07/07/2020, 2:55 PM
    better said, hexahedral
  • s

    slopezcastano

    07/07/2020, 2:55 PM
    I assume you want to space average along the horizontal planes, right?
  • a

    akshay11235

    07/07/2020, 2:57 PM
    I took care of that by forcing a decomposition method only on the periodic directions and then I get say U(z) where z is vertical. So yes you are right. I have setup a code which does exactly that however it's limited to even decomposition in periodic directions.
  • s

    slopezcastano

    07/07/2020, 2:58 PM
    I guess you have seen postChannel?
  • a

    akshay11235

    07/07/2020, 2:58 PM
    Yes I have
  • s

    slopezcastano

    07/07/2020, 3:00 PM
    you just need to create a library out of the channelIndex class
  • s

    slopezcastano

    07/07/2020, 3:01 PM
    and use the collapse method to throw the line profiles
  • s

    slopezcastano

    07/07/2020, 3:02 PM
    have you tried that?
  • a

    akshay11235

    07/07/2020, 3:04 PM
    I read through the code but haven't implemented it. I guess it's worth a shot to translate the code. I implemented my own code within the solver and was working with that.
  • a

    akshay11235

    07/07/2020, 3:04 PM
    Need to sit down and read through the post channel utility again I guess.
  • a

    akshay11235

    07/07/2020, 3:05 PM
    However I don't see how different would the post channel be since one way or the other you would have to access the mesh right? So the main load would equivalent
  • s

    slopezcastano

    07/07/2020, 3:05 PM
    As I see it, you can do it in two ways: you can create a library and call it during runtime, the use coded functionObjects to create an instance of the class and collapse the fields
  • s

    slopezcastano

    07/07/2020, 3:06 PM
    The mesh is not passed by value, it's passed as a reference to the channelIndex class templateµ
  • s

    slopezcastano

    07/07/2020, 3:06 PM
    The second way is to add the H file in the solver and direclty instatiate the class
  • a

    akshay11235

    07/07/2020, 3:07 PM
    I'm using the second way
1...101112...52Latest