https://linen.dev logo
Join Discord
Powered by
# function-objects
  • u

    ⵣAryazⵣ

    05/13/2025, 12:49 PM
    Then within the decomposeParDict file, you need to use the
    singleProcessorFaceSets
    constraint
  • y

    Yann

    05/13/2025, 12:54 PM
    Can't you achieve the same with a constraint on the AMI patches rather than having to make a faceSet? Or is there a benefit using ``singleProcessorFaceSets`` instead?
  • u

    ⵣAryazⵣ

    05/13/2025, 12:54 PM
    How?
  • y

    Yann

    05/13/2025, 12:56 PM
    https://develop.openfoam.com/Development/openfoam/-/blob/master/etc/caseDicts/annotated/decomposeParDict
  • y

    Yann

    05/13/2025, 12:57 PM
    there used to be a ``preservePatches`` alongside the ``singleProcessorFaceSets``
  • u

    ⵣAryazⵣ

    05/13/2025, 12:57 PM
    No. That's misleading, unfortunately
  • y

    Yann

    05/13/2025, 12:57 PM
    which have been replaced by another syntax to define constraints
  • u

    ⵣAryazⵣ

    05/13/2025, 12:58 PM
    That doesn't do what you think it does
  • y

    Yann

    05/13/2025, 12:58 PM
    what does it do?
  • u

    ⵣAryazⵣ

    05/13/2025, 12:59 PM
    Check this: https://www.openfoam.com/news/main-news/openfoam-v2112/parallel#decomposition
  • y

    Yann

    05/13/2025, 12:59 PM
    (sorry for hijacking your question Zino! 😅 )
  • u

    ⵣAryazⵣ

    05/13/2025, 1:00 PM
    Check the figures
  • u

    ⵣAryazⵣ

    05/13/2025, 1:00 PM
    https://cdn.discordapp.com/attachments/942811484730323045/1371834596269887539/v2112-decomposition-constraints-cellDist_random_preservePatches_new-1000.png?ex=68249407&is=68234287&hm=df9973136672abe768c4a2706eb2eaf2e1b977f9511a788b39b11431be4f562a&
  • u

    ⵣAryazⵣ

    05/13/2025, 1:02 PM
    and this
  • u

    ⵣAryazⵣ

    05/13/2025, 1:02 PM
    https://www.cfd-online.com/Forums/openfoam-solving/253609-openfoam-v2306-preservepatches-does-not-preserve-cyclicami-patches.html
  • u

    ⵣAryazⵣ

    05/13/2025, 1:03 PM
    preservePatches (what a misleading name) presevers owner/neifgbour for each cell only
  • u

    ⵣAryazⵣ

    05/13/2025, 1:03 PM
    not the entire patches
  • y

    Yann

    05/13/2025, 1:04 PM
    Alright, got it, but I don't understand the point. I mean I thought the whole idea was to keep AMI interfaces on the same processor, But what happens on your figure once your mesh starts moving? Doesn't it ruin the whole idea of synchronizing owner/neighbors?
  • u

    ⵣAryazⵣ

    05/13/2025, 1:04 PM
    in the figure: the cells on the left/right of the green line have the same color, i.e. belong to the same processor
  • u

    ⵣAryazⵣ

    05/13/2025, 1:05 PM
    I don't know, but the post I linked above, addresses the same question
  • y

    Yann

    05/13/2025, 1:07 PM
    Yep, your link on the release notes is pretty clear. It indeed does not do what I thought.
  • y

    Yann

    05/13/2025, 1:09 PM
    I just don't get the point of synchronizing owner/neighbors cells on a mesh which will move during the simulation, most of the time.
  • y

    Yann

    05/13/2025, 1:13 PM
    Good to know though, thanks for pointing it out. I'll try to remember it next time I need to use AMI
  • z

    Zino

    05/13/2025, 1:20 PM
    I think I did try to run it on a reconstructed case and it had the same error, but I'll have to check tomorrow
  • y

    Yann

    06/04/2025, 9:59 AM
    Hello folks. I'm running a simpleFoam simulation with scalarTransport. I have a fixedValue for my scalar on the walls and I would like to compute the wall flux. Something like ``wallFlux=D*snGrad(s)`` Do you see any flaw/mistake here and how to achieve it? I'm thinking of using a coded function object as I don't see how to do it using others FO
  • m

    Mairon

    06/10/2025, 1:55 PM
    There is a flux FO, https://www.openfoam.com/documentation/guides/latest/doc/guide-fos-field-flux.html#:~:text=Further%20information-,Description,of%20an%20input%20vector%20field. —But I think coded seems straightforward (and easier)!
  • y

    Yann

    06/12/2025, 9:01 AM
    Thanks, I somehow missed this one! I'm going to give it a try.
  • y

    Yann

    06/13/2025, 12:10 PM
    I'm using a ``surfaces`` function object to sample data on a surface. Do you guys know if there is an option to output the magnitude of a vector rather than the components? I can't find anything about it but i feel like it's difficult to find stuff in the sampling lib
    Copy code
    surfaces
    {
        type            surfaces;
        libs            ("libsampling.so");
        writeControl    writeTime;
        surfaceFormat   raw;
        writeFormat     binary;
        fields          (static(p)_coeff wallShearStress);
        interpolationScheme cellPoint;
    
        surfaces
        (
            aerofoil
            {
                type            patch;
                patches         (aerofoil);
                interpolate     true;
            }
        );
    }
  • t

    tkeskita

    06/13/2025, 2:15 PM
    You need to calculate mag as a field first, then you can save it in surfaces
  • y

    Yann

    06/13/2025, 2:34 PM
    I hoped there would be a direct way but I'll survive 😄