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

Understanding unit conversion and field discretization

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

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   October 23, 2013, 11:38
Default Understanding unit conversion and field discretization
  #1
Senior Member
 
Join Date: Oct 2009
Posts: 140
Rep Power: 16
Peter_600 is on a distinguished road
Hello Foamers,

my problem relates to the ElectostaticFoam solver.
Its rhoEFlux field, corresponding to current density in continuum physics, is defined as surfaceScalarField, that is, the current going through the faces of the cells. The same goes for the electric field -fvc::snGrad(phi).

However, electrical conductivities are specified per volume. How does one convert a physical electrical conductivity to the k-factor used in the formula:

rhoFlux = -k*mesh.magSf()*fvc::snGrad(phi);

I understand that OF discretization uses surfaceScalarFields instead of volVectorFields for discretizing vectors, but why? Or better said, what are the consequences for the conductivity term?

For reference:
Physical conductivity sigma is s^3A^2kg^-1m^-3 but in ElectrostaticFoam k is s^2*A*kg^-1 (as seen in chargedWire tutorial)
Peter_600 is offline   Reply With Quote

Old   October 24, 2013, 01:54
Default
  #2
Senior Member
 
Bernhard
Join Date: Sep 2009
Location: Delft
Posts: 790
Rep Power: 21
Bernhard is on a distinguished road
The reasoning behind the surface scalar fields is to somehow get a kind of staggered grid arrangement. Because the fluxes are explicitly known on the cell face, it is somehow easier to guarantee continuity (of mass, or charge if you like).

In your case, phi is not the conductivity. You are solving for it, and it is the electric potential. The unit you mention is just Volt.
Bernhard is offline   Reply With Quote

Old   October 24, 2013, 03:34
Default
  #3
Senior Member
 
Join Date: Oct 2013
Posts: 397
Rep Power: 18
chriss85 will become famous soon enough
Hello, I am working together with Peter on this.

I think you misunderstood us, we were not asking about phi but about sigma/k.
To our understanding, phi is just the basic electric potential.

I noticed that the unit of k equals physical sigma per charge density, so rhoFlux is not the current density but really the flux of charge without the charge itsself, hence the additional multiplication by rho in the continuity equation. However, how does that translate to the k/sigma conversion? Do I need to convert the common physical conductivity sigma by dividing it through the rho field to get k? If yes, what's the physical meaning of k? Conductivity per charge density? I don't see how this could be constant when the charge density isn't.
chriss85 is offline   Reply With Quote

Old   October 24, 2013, 04:13
Default
  #4
Senior Member
 
Bernhard
Join Date: Sep 2009
Location: Delft
Posts: 790
Rep Power: 21
Bernhard is on a distinguished road
I don't know exactly, what does the transport equation for the charge density physically look like?
Bernhard is offline   Reply With Quote

Old   October 24, 2013, 07:02
Default
  #5
Senior Member
 
Join Date: Oct 2013
Posts: 397
Rep Power: 18
chriss85 will become famous soon enough
The potential (or field) is linked to the charge density by the first Maxwell equation (see here: http://en.wikipedia.org/wiki/Gauss%27s_law ).

The charge conservation equation is listed here, "Formal statement of the law": http://en.wikipedia.org/wiki/Charge_conservation .
It's basically the charge density rho that has been removed from the current density and is later multiplied into the charge conservation: j = rho * rhoFlux, and the solver uses rhoFlux instead of j.
We're working with a field of different conductivities in our problem but we need to convert it from a physically meaningful conductivity to the k-factor used in the electrostatic solver. I suppose this means that I need to modify the solver and divide by rho in the calculation of rhoFlux so that I can use sigma instead of k. Can anyone confirm this?
chriss85 is offline   Reply With Quote

Old   October 25, 2013, 05:11
Default
  #6
Senior Member
 
Join Date: Oct 2013
Posts: 397
Rep Power: 18
chriss85 will become famous soon enough
there is also a problem when it comes to modifying the equation to introduce a conductivity field. As rho is not constant I need to divide by rho in the equation for rhoFlux. This can obviously lead to problems where rho=0. Is it possible to modify the continuity equation so that rhoFlux includes rho in it and the "/rho * rho" steps aren't required?

I'm not quite sure why rhoFlux is defined like this. To me it looks like a bug, but this may just as well be my inexperience with numerics. I just can't see how it would work out physically correct with a non-constant rho when the solver doesn't include the "/rho" term in the rhoFlux equation?

Running the chargedWire example converges to a solution where there is only charge density at the boundary, the rest being 0. That might be seen as correct, but I don't think it would be in any transient scenario.

Seeing that the solver includes a time dependent term in the continuity equation and that it uses the Euler method for ddt, I think it is also meant for transient problems?
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
Cartesian to cylindrical velocity field conversion francois OpenFOAM Post-Processing 11 November 30, 2017 05:52
Problem with rhoSimpleFoam matteo_gautero OpenFOAM Running, Solving & CFD 0 February 28, 2008 06:51
Conversion from unstructured field to structured henna Main CFD Forum 2 November 4, 2003 05:30


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