CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Programming & Development (https://www.cfd-online.com/Forums/openfoam-programming-development/)
-   -   Adding massSource option to fvOptions (https://www.cfd-online.com/Forums/openfoam-programming-development/244399-adding-masssource-option-fvoptions.html)

levoCFD August 5, 2022 11:52

Adding massSource option to fvOptions
 
Hi,

I am trying to add Will Bainbridge's massSource (https://github.com/OpenFOAM/OpenFOAM-dev/commit/69e98dc28d1c5d6846f4c34ed5ee0918c7519f90) to the available sources in the fvOptions.

Therefore, I have:
  • added the line
    Code:

    $(derivedSources)/massSource/massSource.C
    to the src/fvOptions/Make/files file,

  • added the file massSource.C to the src/fvOptions/sources/derived/ directory,
  • added the file massSource.H to the src/fvOptions/sources/derived/ directory
Still, when I select massSource in the fvOptions, I am getting the error:
Code:

--> FOAM FATAL ERROR:
  Unknown Model type massSource

Is there any other step I have missed out? It is my first time modifying OpenFOAM source code.
Does someone have experience with this new source type?

levoCFD August 9, 2022 05:04

Turned out the problem had nothing to do with the new code itself. I simply did not compile it properly.
I am now able to use massSource as a source.

However, when I try to use it in one of the tutorial cases it is not giving the expected results. I have modified the multiphaseEulerFoam/injection case as shown at https://github.com/OpenFOAM/OpenFOAM-dev/commit/69e98dc28d1c5d6846f4c34ed5ee0918c7519f90 but when I run the case and view the results in paraView there is no injection anymore.

Has anyone successfully used massSource?

MitchWhiting August 21, 2023 09:50

Hi Lennart,

Did you ever come right with your issues, also what version of OpenFOAM did you manage to compile this library on?

Thanks in advance


All times are GMT -4. The time now is 01:08.