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

electroMagnetoStaticFoam solver - solve static electric and magnetic fields

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

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   May 15, 2014, 05:51
Default electroMagnetoStaticFoam solver - solve static electric and magnetic fields
  #1
Senior Member
 
Join Date: Oct 2013
Posts: 397
Rep Power: 18
chriss85 will become famous soon enough
I have created a simple solver for calculating static electric potentials/fields, currents and magnetic potentials/fields, given a conductivity distribution. The magnetic fields currently assume a constant magnetic permeability.

The solver is attached together with an example, feel free to use it.
I have also included the boundary conditions from http://www.cfd-online.com/Forums/ope...particles.html, so credits go to Dzhordzhs for them. I haven't used them successfully yet, but maybe someone will find it useful.

I also have a problem regarding the supplied example that I haven't been able to solve yet.

The example is a simple, rectangular conductor made out of two materials with different conductivities. Physics require that the current is divergence-free everywhere. However, this is not the case at the step.
The problem happens because of interpolation issues while calculating the gradient of the electric potential. The step in conductivity is instantaneous, so the slope of the electric potential changes its steepness. In the continuum one would have different electric field strengths for the two materials. However, the gradient can't be infinite, and so the current will have a divergence at the border, since j=sigma*E, and sigma and E aren't consistent to each other. The attached image shows this behavior.

I have tried to use a higher order gradient scheme, but this has only lowered the problem by a very small amount.

Is there any other formulation one could use to prevent this kind of problems? Maybe calculate the gradients as surfaceScalarFields?
Attached Images
File Type: jpg step.jpg (70.3 KB, 28 views)
Attached Files
File Type: zip electroMagnetoStaticFoam.zip (19.8 KB, 25 views)
chriss85 is offline   Reply With Quote

Old   May 15, 2014, 06:09
Default
  #2
Super Moderator
 
bigphil's Avatar
 
Philip Cardiff
Join Date: Mar 2009
Location: Dublin, Ireland
Posts: 1,089
Rep Power: 34
bigphil will become famous soon enoughbigphil will become famous soon enough
Hi,

This is very similar to solid mechanics when there are joined materials, so there is a step jump in diffusivity (i.e. Young's modulus) at the interface. The standard finite volume discretisation results in erroneous peaks.

For the multi-material solids, a special discretisation must be used, see this paper:
http://onlinelibrary.wiley.com/doi/1....4390/abstract
The accepted draft can be downloaded from here: http://irserver.ucd.ie/bitstream/han...pdf?sequence=2

This has been implemented as an option in the elasticSolidFoam solver where the discretisation coefficients at the interface are corrected.

Best regards,
Philip
bigphil is offline   Reply With Quote

Old   May 15, 2014, 06:35
Default
  #3
Senior Member
 
Join Date: Oct 2013
Posts: 397
Rep Power: 18
chriss85 will become famous soon enough
Thanks, this looks interesting.

I looked a bit in the implementation of solidElasticFoam, and on first sight it looks like it specifically treats interfaces. In a general case I have a continous variation of conductivity though. Is this method suitable there?
chriss85 is offline   Reply With Quote

Old   May 15, 2014, 06:50
Default
  #4
Super Moderator
 
bigphil's Avatar
 
Philip Cardiff
Join Date: Mar 2009
Location: Dublin, Ireland
Posts: 1,089
Rep Power: 34
bigphil will become famous soon enoughbigphil will become famous soon enough
Quote:
Originally Posted by chriss85 View Post
In a general case I have a continous variation of conductivity though. Is this method suitable there?
That's a good question;

standard FV discretisation (e.g. standard central-differencing for Laplacian term) assumes a linear distribution across the face in the face normal direction, but if there is a step jump at the interface then this assumption is poor (and actually gets worse with mesh refinement) hence the special procedure.

But if there is no step jump (continuously varying diffusivity and grad of solution variable) then the standard FV discretisation should actually be OK as the mesh is refined.

So the special procedure is only necessary for step jumps in gradU due to step jumps in material properties, but it actually reduces to standard form when there is no jump in properties.

In your previous post you have a step and hence you get error peaks; but if you had a smooth continuous distribution then I suppose it should be OK as the mesh is refined, but I have not really looked in to continuously varying diffusivity, so I'm not sure.

Philip
bigphil is offline   Reply With Quote

Old   May 15, 2014, 07:06
Default
  #5
Senior Member
 
Join Date: Oct 2013
Posts: 397
Rep Power: 18
chriss85 will become famous soon enough
Yes, that's more or less what I've been thinking.
In my real application (plasmas) I'm using a model that has a different conductivity in the first cell layer to a wall, and I notice this behavior there. I also think that this causes a rather large error there, because the current significantly influences the energy balance in the plasma.
I may have to think of other ways then, maybe applying a gaussian filter to the conductivity to smooth it a bit?

I will try to take a deeper look in the paper you linked and see if I can use this method though. Unfortunately I don't know much about solid displacement modelling, but I hope I can manage
chriss85 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
Multi-region solver for electric and magnetic fields + charged particles Dzhordzhs OpenFOAM Running, Solving & CFD 22 May 2, 2022 21:59
(MHD simulation)Can magnetic force be the driving force of ferrofluid? yaoxy FLUENT 0 June 4, 2013 02:14


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