CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM Programming & Development (http://www.cfd-online.com/Forums/openfoam-programming-development/)
-   -   Adding additional complex source term to BuoyantBoussinesqPisoFoam solver (http://www.cfd-online.com/Forums/openfoam-programming-development/106743-adding-additional-complex-source-term-buoyantboussinesqpisofoam-solver.html)

pajofego September 6, 2012 15:50

Adding additional complex source term to BuoyantBoussinesqPisoFoam solver
 
Hello all,

I'm looking for an starting point how to add a complex source term to the momentum equation of the BuoyantBoussinesqPisoFoam solver:

As described in the openfoamwiki the governing equation for the momentum is:

\frac{\partial \bar{u}_i}{\partial t} + \frac{\partial}{\partial x_j} \left( \bar{u}_j \bar{u}_i \right) = -\frac{\partial} {\partial{x_i}} \left( \frac{\bar{p}}{\rho_0} \right) + \frac{1}{\rho_0}\frac{\partial}{\partial x_j} \left( \tau_{ij} + \tau_{t_{ij}} \right) + \frac{\bar{\rho}}{\rho_0} g_i + \mathbf{\frac{F_i}{\rho_0}}

The term F_i stays for the complex source, which is defined as follows:

F_1 = \rho_0 2\Omega(\sin(\varphi)u_2 - \cos(\varphi)u_3x_3)

\varphi depends from the position of the coordinate x_1 and x_2

F_2 = -\rho_0 2\Omega(\sin(\varphi)u_1 and last for F_3 = \rho_0(x_3^2-1)(\cos(\varphi)\frac{u_1}{x_3} +  \beta(\bar{T}-T)g)+\rho_0\cos(\varphi)\frac{u_1}{x_3}+x_3(\bar{p}-\rho_0u^{2}_{2})

Does anyone can give me please a hint how I should start to model such complex source terms in the openfoam library? Maybe there is a good example?

Thanks to all and best regards
pajofego

wolfindark April 9, 2013 03:07

Hello pajofego

I am working on similar thing. did you find a way?

thanks

pajofego April 9, 2013 17:00

Hi,

not really. The only way that I've found, but not tested, is to use swak4foam. http://www.cfd-online.com/Forums/ope...urce-term.html

For more complex source term handling I suppose that's necessary to get familiar with the OF code.

Best regards
pajofego


All times are GMT -4. The time now is 03:10.