CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Programming & Development

magnetostaticFoam / how to set correct boundary conditions for every cell..?

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   July 16, 2015, 10:23
Default magnetostaticFoam / how to set correct boundary conditions for every cell..?
  #1
New Member
 
Jan
Join Date: Oct 2014
Posts: 8
Rep Power: 11
riddim is on a distinguished road
Hey there,

I'm trying to use a solver for magnetostatic fields (with areas of different permeability) … I thought that shouldn't be a problem for openFoam and started very enthusiastic
… I did quite some reading lately … but am a little bit frustrated right now

… i ran some tutorials, programmed the rodfoam-solver (http://www.tfd.chalmers.se/~hani/kurser/OS_CFD – works perfectly) and then programmed this (http://webfiles.portal.chalmers.se/e...heHuangMSc.pdf) solver that should have been perfect for my purposes.
First I was a little bit irritated I wasn't able to find it ready-to-use in the openfoam-package … but now I'm pretty sure it is because it simply doesn't work properly …

At first it seems like an easy task to set up a magnetostatic solver … just
Code:
solve ( 1.0/(muMag*muR)*fvm::laplacian(A)==-J;
should do the job … but with different muR's the tangential component of the B-Field is not continuous (just like the normal component of the H-Field). This is not addressed by this simple equation …

In my mind at least these boundary conditions (on every cell face) have to be implemented … (the mhdFoam-solver doesn't use a magnetic vector potential and ignores these boundary conditions in the same way the other solvers do … i already looked how it was done there)

How can I get access to „neighbour-variables“ within a solver …?
I found
http://www.cfd-online.com/Forums/ope...vsf1-vsf2.html
but am not sure if it really is what I need and if i can use these commands in any solver or if I would have to change the source of OpenFoam itself …
and to be honest … I have some problems with the solver algorithms …

why is the output of
Code:
 solve ( fvm::laplacian(viR,A)==-J*muMag );
different to
Code:
  
 solve ( fvm::laplacian(A)==-J*muMag/viR );
…? it shouldn't be … should it ..?
This has something to do with local variable values of different cells …?

I'm a little bit lost … and I don't really see where to start right now … I would like to set somewhere the relations
B_tan2 = B_tan1*muR_2/muR_1 and B_normal == const.
And then have my div(B) == 0 and rot(H)=J solved :-O …

Could you please help me to get started with this task ..? I'm looking forward for hints how to get this solver running!

Last edited by riddim; July 16, 2015 at 12:08.
riddim is offline   Reply With Quote

Old   July 14, 2019, 12:25
Default magnetostatic in openfoam
  #2
Member
 
Saleh Abuhanieh
Join Date: Nov 2017
Posts: 82
Rep Power: 8
Saleh Abuhanieh is on a distinguished road
Hi,


I wonder if anybody figure out how to solve a magnetostatic model using openfoam.




Regards,


Saleh
Saleh Abuhanieh is offline   Reply With Quote

Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Difficulty In Setting Boundary Conditions Moinul Haque CFX 4 November 25, 2014 18:30
Low Mixing time Problem Mavier CFX 5 April 29, 2013 01:00
Error finding variable "THERMX" sunilpatil CFX 8 April 26, 2013 08:00
Water subcooled boiling Attesz CFX 7 January 5, 2013 04:32
RPM in Wind Turbine Pankaj CFX 9 November 23, 2009 05:05


All times are GMT -4. The time now is 13:07.