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/)
-   -   Add source term in icoReactingMultiphaseInterFoam VOF equation (https://www.cfd-online.com/Forums/openfoam-programming-development/243960-add-source-term-icoreactingmultiphaseinterfoam-vof-equation.html)

CHUIKOV July 14, 2022 07:02

Add source term in icoReactingMultiphaseInterFoam VOF equation
 
Dear Foamers

I'm looking into icoReactingMultiphaseInterFoam for a laser melting case with added mass (blown powder or wire).

I had a look at the solver structure but cant find the alphaEqn.H file. I would like add a source term for the liquid phase in the corresponding VOF equation.

Any idea how to proceed?

many thanks in advance,

Chuikov

überschwupper July 15, 2022 02:24

Peace,


the alpha equation is integrated inside of the >>fluid.solve()<< routine of the multiphaseSystem class. The solve() function then calls the function >>solveAlphas()<< function.


My ideas would be:
1.) calculate your source term and add it to the equation. Ensure that this term is zero for the other phases
2.) Conditional statement and just add your source term if the condition is met


Copy that library in you rown library folder

recompile that library into FOAM_USER_LIBBIN (best under a different name)

change inside the Make/options file inside the icoReactingMultiphaseInterFoam directory the source directory of your library and the library name

CHUIKOV July 19, 2022 02:12

many thanks for your kind assistance!

looks like quite a complex function, I will try my luck with a coded source via fvOptions

cheers!


All times are GMT -4. The time now is 19:33.