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/)
-   -   The implementation of one of the Maxwell's equations in OpenFOAM (https://www.cfd-online.com/Forums/openfoam-programming-development/162719-implementation-one-maxwells-equations-openfoam.html)

liuke870915 November 16, 2015 07:04

The implementation of one of the Maxwell's equations in OpenFOAM
 
3 Attachment(s)
hello,everybody
My major is megnetohydrodynamics, and I am developing a solver to test the instability of MHD. In the solving process, I need to solve one of the Maxwell's equations,see the first attachment,for a steady electric field, the second term of the right hand of this equation is neglected, and it becomes the second attachment , In OpenFOAM, it should be fvc::curl(B)=mu * J (mu is magnetic permeability, J is the current density, and both of them have known), but, after solving this equation, I got a zero field of B(magnetic field), it means the results of this equation is always zero. I want to know how can I implement this equation on OpenFOAM platform. Anybody can help me. Thank you.

akidess November 16, 2015 08:11

You cannot solve for B using fvc, because an element you are trying to compute will be dependent on elements you have not computed yet. A curl is nasty using fvm, because you will have coupling between the vector components. The solution is to change your mathematical model to get rid of the curl.

chriss85 November 16, 2015 11:29

You should look if your problem allows to use magnetostatics.
Then you can use the magnetostatic vector potential and, for constant mu, solve laplace(A)=mu * j and then B = curl(A). If you need variable mu things become more difficult. You can look up T-T0-Phi method for one possibility. If you find some better suited method, please let me know :)

liuke870915 November 17, 2015 02:04

dear akidess
thank you, I will have a try. because the cfd-online website can not be used regularly, I respond to your answer with this way! thank you!

liuke870915 November 17, 2015 02:09

Dear chriss85
thank you!
This method has been tried, but it is very unstable, so I need find a new way to solve this equation.

chriss85 November 20, 2015 06:44

Which method are you talking about? The ones I mentioned are very stable from my experiences.


All times are GMT -4. The time now is 12:58.