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/)
-   -   Source terms with gradient and curl (https://www.cfd-online.com/Forums/openfoam-programming-development/204773-source-terms-gradient-curl.html)

msaravia July 31, 2018 19:06

Source terms with gradient and curl
 
Hi, I am trying to solve an equation of the form:


\nabla^2A = - b \cdot (\nabla A-\nabla A^T)

being A and b vector fields; so, \nabla A is the Jacobian and \nabla A-\nabla A^T is a skew symmetric tensor. The equation can also be written as:

\nabla^2A = -b \times (\nabla \times A)

I am wondering wich is the best way to treat the RHS. I have been thinking of using simply

Code:

fvm::laplacian(A) == b ^ fvc::curl(A)
or
Code:

fvm::laplacian(A) == b & ( fvc::grad(A)-fvc::grad(A).T)
I know that positive sources should be treated implicitly, but the RHS is no actually a source. Also, the curl does not have an implicit implementation in OpenFOAM.

At last... I'm lost. Any suggestions to implement this equation would be welcome!

Thanks

tom_flint2012 February 28, 2020 17:00

any progress
 
Hi,


I'm implementing a similar equation. I thought I had some success converting one of my curls using identities but cant get rid of another.



Have you made any progress with this in openfoam?


Thanks,


Tom


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