
[Sponsors] 
October 23, 2013, 11:38 
Understanding unit conversion and field discretization

#1 
Senior Member
Join Date: Oct 2009
Posts: 136
Rep Power: 9 
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 kfactor 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) 

October 24, 2013, 01:54 

#2 
Senior Member
Bernhard
Join Date: Sep 2009
Location: Delft
Posts: 790
Rep Power: 14 
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. 

October 24, 2013, 03:34 

#3 
Senior Member
Join Date: Oct 2013
Posts: 374
Rep Power: 7 
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. 

October 24, 2013, 04:13 

#4 
Senior Member
Bernhard
Join Date: Sep 2009
Location: Delft
Posts: 790
Rep Power: 14 
I don't know exactly, what does the transport equation for the charge density physically look like?


October 24, 2013, 07:02 

#5 
Senior Member
Join Date: Oct 2013
Posts: 374
Rep Power: 7 
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 kfactor 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? 

October 25, 2013, 05:11 

#6 
Senior Member
Join Date: Oct 2013
Posts: 374
Rep Power: 7 
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 nonconstant 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? 

Thread Tools  
Display Modes  


Similar Threads  
Thread  Thread Starter  Forum  Replies  Last Post 
Cartesian to cylindrical velocity field conversion  francois  OpenFOAM PostProcessing  9  February 12, 2010 12:17 
Problem with rhoSimpleFoam  matteo_gautero  OpenFOAM Running, Solving & CFD  0  February 28, 2008 07:51 
Conversion from unstructured field to structured  henna  Main CFD Forum  2  November 4, 2003 06:30 