https://linen.dev logo
Join Discord
Powered by
# programming
  • t

    tkeskita

    06/19/2025, 12:17 PM
    Is there version number that could be used? I don't try to reach 100% working solution here..
  • p

    Paketbote

    06/19/2025, 12:23 PM
    solids4foams does something like this. For example: https://github.com/solids4foam/solids4foam/blob/master/src/solids4FoamModels/fluidModels/pimpleFluid/pimpleFluid.C.
  • i

    ilovekiruna

    06/19/2025, 12:29 PM
    Here s bit more granular example with then ifdefs in the code: https://github.com/CFDEMproject/CFDEMcoupling-PUBLIC/blob/master/src/lagrangian/cfdemParticle/etc/OFversion/OFversion.H
  • i

    ilovekiruna

    06/19/2025, 12:31 PM
    For the foam-extend-adapter of preCICE i maintain version specific branches in one repository
  • o

    otaolafr

    06/19/2025, 12:36 PM
    and then my scripts are sketchy :p ahahaha
  • t

    tkeskita

    06/19/2025, 12:37 PM
    This looks interesting, the definition is here: https://github.com/solids4foam/solids4foam/blob/master/etc/wmake-options https://github.com/solids4foam/solids4foam/blob/master/src/solids4FoamModels/Make/options
  • y

    Yann

    06/19/2025, 12:58 PM
    could it be helpful to us ``$WM_PROJECT_VERSION``?
  • y

    Yann

    06/19/2025, 1:01 PM
    alright I didn't check the links, this is pretty much what solids4foam use
  • n

    natsfr

    06/20/2025, 10:14 PM
    Hello, Distribution: v12 Fondation (on ubuntu) I'm trying to modify the module compressibleVoF to add the Lee model in the fvModel. I didn't have trouble to compile it with the new model: In file fvModels/VoFLeeModel/VoFLee.H > #ifndef VoFLee_H > #define VoFLee_H > > #include "fvModel.H" > > // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // > > namespace Foam > { > > class compressibleTwoPhaseVoFMixture; > > namespace fv > { > namespace compressible > { > > class VoFLee > : > public fvModel > { > // Private Data > > //- Reference to the mixture properties > const compressibleTwoPhaseVoFMixture& mixture_; > > > public: > > //- Runtime type information > TypeName("compressible::VoFLee"); I directly compiled in the opt to avoid all the problem of using the user path. I verified that everything is compiled and the libcompressibleVoFLee.so is present but when I try to use this fvModel in a case: > FoamFile > { > format ascii; > class dictionary; > location "constant"; > object fvModels; > } > // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // > > VoFLee > { > type compressible::VoFLee; > } The foamRun error is the following: > Selecting finite volume model type compressible::VoFLee > > > --> FOAM FATAL IO ERROR: > Unknown fvModel compressible::VoFLee Followed by a list of valid models which doesn't to include model already present in the distribution. I tried to trace this error and found that there is a dict built into fvModel.C but I don't know where I should register my model.
  • t

    tkeskita

    06/21/2025, 5:16 AM
    Did you add `libs`entry to your controlDict? I think it needs to be added regardless of library location. https://doc.cfd.direct/openfoam/user-guide-v12/controldict
  • n

    natsfr

    06/21/2025, 8:59 AM
    I just tested adding > application foamRun; > libs ( "libcompressibleVoFLee.so" ); > solver compressibleVoF; and it doesn't change the problem the error is still the same
  • n

    natsfr

    06/21/2025, 9:00 AM
    My bad I also have a new warning before: > --> FOAM Warning : > From function void* Foam::dlOpen(const Foam::fileName&, bool) > in file POSIX.C at line 1247 > dlopen error : /home/nats/OpenFOAM/nats-12/platforms/linux64GccDPInt32Opt/lib/libcompressibleVoFLee.so: undefined symbol: _ZTIN4Foam30compressibleTwoPhaseVoFMixtureE > --> FOAM Warning : > From function bool Foam::dlLibraryTable::open(const Foam::fileName&, bool) > in file db/dynamicLibrary/dlLibraryTable/dlLibraryTable.C at line 106 > could not load "libcompressibleVoFLee.so"
  • t

    tkeskita

    06/21/2025, 9:37 AM
    Undefined symbol means the linker is missing a library, in this case compressibleTwoPhaseVoFMixture
  • n

    natsfr

    06/21/2025, 11:15 AM
    Yes I know that but this one should be in the distribution no ?
  • t

    tkeskita

    06/21/2025, 12:22 PM
    Yes it exists there as a file, but some link to it is missing. Did you try add that lib to Make/options file?
  • n

    natsfr

    06/21/2025, 6:52 PM
    there is something I must be missing, I have no problem compiling the module and the set of fvModels, so there is a no link problem at that time. When I run foamRun I guess it compiles what needed using library available in openFoam. I'll try to find how to add library at compile time
  • q

    qr

    06/21/2025, 6:53 PM
    Does libCompressibleVOFLee include access to CompressibleVoFMixture? The pointer to the second object is missing...
  • t

    tkeskita

    06/22/2025, 2:14 PM
    How is it possible that when this preprocessor block is run, it includes both createMesh.H and createMeshNoClear.H? 😵‍💫
    Copy code
    #ifdef OPENFOAM_ORG
            #include "createMesh.H"
        #else
            #include "createMeshNoClear.H"
        #endif
    I know it includes the latter as well, because it says
    Copy code
    could not open file createMeshNoClear.H for source file smoothMesh.C due to No such file or directory
  • t

    tkeskita

    06/22/2025, 2:18 PM
    What is weird is that it works fine when OF2412 is sourced, but not correctly when OF12 is sourced.. There must be some difference in wmake between the forks..?
  • t

    tkeskita

    06/22/2025, 3:05 PM
    Wow, also wmake is much diverged between the forks 🤦
  • o

    otaolafr

    06/22/2025, 9:29 PM
    I had issues with make and wclean that the other branch was sourced and it was not cleaning correctly
  • m

    muehhlllerr

    06/25/2025, 8:27 AM
    just a general question, are fvc / fvm evaluations lazy? what I mean is that if I were to intoduce a field similar to "triggerOrth" which has the value 0 for cells with a non orthogonality smaller than a threshold and 1 for those above, could I replace a fvm::div call with triggerOrth*fvm::div(...,"upwind") + (1 - triggerOrth) **fvm::div(...,"linear"), without any significant performance penalties?
  • q

    qr

    06/25/2025, 8:38 AM
    Not sure about lazy but about that weighted thing, yeah you can do that, although technically your global solution will still be deemed first order accurate, and some effect of upwinded cells will bleed into the linear ones
  • q

    qr

    06/25/2025, 8:40 AM
    Would be interesting to see the overall solution with this strategy (seems in spirit similar to MULES type algos which blend multiple schemes for flux calculation)
  • m

    muehhlllerr

    06/25/2025, 10:57 AM
    might try to implement that, Im currently working on a setup that combines a unstructured section meshed with tet cells and a section that is structured (and very high quality) made with classy. Would be a waste to sacrifice the accuracy on the rather large structured section
  • b

    blackk100

    06/28/2025, 9:23 PM
    Are there any tutorials on implementing custom discretization schemes? I'm trying to implement the discretization scheme described by eq. 16-17 in https://doi.org/10.1016/j.compfluid.2018.03.047, and working with OF-12.
  • k

    kid with polio

    06/30/2025, 4:05 PM
    I found this custom solver (https://github.com/FloatStepper/FloatStepper/tree/master) that addresses the added mass instability problem, but it only supports a single rigid body at the moment. There's a year old issue noting that the mesh displacements update for each body instead of once at the end of the timestep which is the reason why multiple bodies aren't supported. I'm not sure but I think the
    src/floaterMotion/dynamicFloaterMotionSolversFvMesh/dynamicFloaterMotionSolversFvMesh.C
    file and maybe
    src/floaterMotion/floaterMotionSolver/floaterMotionSolver.C
    are the only files I need to touch but I'm really not sure how to go about modifying it to support multiple rigid bodies. Can anyone help out?
  • s

    slopezcastano

    07/03/2025, 9:04 AM
    Don't re-invent the wheel. Go abroad the FOAM community and search for a n-body dynamics engine you may couple w/FOAM
  • t

    tkeskita

    07/04/2025, 10:41 AM
    In this C++ sentence, what does the latter
    const
    mean?
    Copy code
    const PtrList<indexedOctree<treeDataEdge>>& regionEdgeTrees() const;
  • s

    slopezcastano

    07/04/2025, 12:25 PM
    That the method doesn't modify the state of the class that invokes it