|
[Sponsors] |
January 18, 2019, 01:54 |
equations in electrostaticFoam
|
#1 |
Member
Wenming Yang
Join Date: Jun 2018
Posts: 42
Rep Power: 8 |
Dear all,
I am trying to understand the electrostaticFoam solver in OpenFOAM. It should solve the Possion equation for electric potential and the continuity equation of electric current for charge density. But in these equations, fvm::ddt(rho) + fvm::div(rhoFlux, rho) and rhoFlux = -k*mesh.magSf()*fvc::snGrad(phi) the term div(rhoFlux, rho) seems not the current density (while in continuity equation of electric current it should be). What the mean of k? It should not be electrical conductivity from dimension analysis. |
|
January 18, 2019, 07:58 |
|
#2 | |
Senior Member
Andrew Somorjai
Join Date: May 2013
Posts: 175
Rep Power: 13 |
Quote:
The same question was asked once here What is the k in electrostaticFoam |
||
January 18, 2019, 21:50 |
|
#3 |
Member
Wenming Yang
Join Date: Jun 2018
Posts: 42
Rep Power: 8 |
Dear Somorjai,
Thank you for your reply. But I still cannot understand . I think k should not be electrostatic constant because of different units. It has an unit of electrical conductivity / charge density. |
|
January 19, 2019, 12:38 |
|
#4 |
Senior Member
Andrew Somorjai
Join Date: May 2013
Posts: 175
Rep Power: 13 |
If you're not sure of it I suggest you write your own equation instead. I don't expect every OpenFOAM tutorial to be perfect or complete myself.
|
|
January 19, 2019, 20:14 |
|
#5 |
Member
Wenming Yang
Join Date: Jun 2018
Posts: 42
Rep Power: 8 |
||
February 21, 2019, 04:31 |
|
#6 |
New Member
Pranavi
Join Date: Feb 2019
Posts: 2
Rep Power: 0 |
Dear Yang,
You are right in that the dimensional formula of k is same as that of . The reason, I realized , may have to do with the casting of the continuity equation in a form similar to the Flux form of an advection equation as follows: ............(1) with , so equation (1) now looks like , Here, , with We can now see that this little trick facilitated adaptation from a "robust" solver . Hope this helps . With regards, pranavi Last edited by Pranavi; February 22, 2019 at 12:21. |
|
February 22, 2019, 03:23 |
|
#7 |
Member
Wenming Yang
Join Date: Jun 2018
Posts: 42
Rep Power: 8 |
Dear Pranavi,
Sorry for the late response. Thank you for your reply. Following your reminder, I understand this equation now. |
|
August 17, 2020, 07:30 |
|
#8 |
Senior Member
Join Date: Oct 2015
Location: Germany
Posts: 100
Rep Power: 11 |
Nice thread...
There's a somewhat related discussion here: Sampling rhoFlux in electrostaticFoam As I understand it, k represents the electron mobility , with being electrical conductivity and the total charge resulting from a given number of elementary charge carriers per cubic meter , e.g. electrons, with charge (in Coulomb, ). If I am right, I assume the confusion concerning the units arises i.a. from the routinely used unit for electron mobility which is . Nevertheless, I might be totally wrong... Last edited by NablaDyn; August 17, 2020 at 11:47. |
|
October 25, 2022, 14:17 |
|
#9 |
Member
JuanMi
Join Date: Nov 2017
Posts: 41
Rep Power: 9 |
k is ion mobility, you can consult this page: https://www.xsim.info/articles/OpenF...argedWire.html
J is current density, and it can be expressed as (https://arxiv.org/ftp/arxiv/papers/2002/2002.11662.pdf): where is charge density , is electric field and potential. However, I don't understand why = fvc::snGrad(phi)*mesh.magSf(); Any idea? |
|
October 26, 2022, 02:13 |
|
#10 |
New Member
Pranavi
Join Date: Feb 2019
Posts: 2
Rep Power: 0 |
That is just the definition (coming from the divergence theorem). Remember that the equations in OpenFOAM are discretized over finite volumes (i.e., the equations are implicitly treated as if multiplied by the cell volume throughout).
So, the gradient operator, which was supposed to be $\nabla \phi = 1\V (\int_S \phi_f dS_f)$ is simply defined as $\nabla \phi = \int_S (\phi_f dS_f). In OpenFOAM notation this becomes fvc::snGrad(phi)*mesh.magSf(). where fvc:: snGrad(phi) is the integral phi (treat it like an interpolation scheme to provide a value of phi at the cell-face), and the direction information comes after multiplication with mesh.magSf(), which contains magnitude and orientation information of the cell face. Hope I am clear!? ..pranavi |
|
October 26, 2022, 03:37 |
|
#11 |
Member
JuanMi
Join Date: Nov 2017
Posts: 41
Rep Power: 9 |
Yes, now it is clear. I got the idea after reading this post: Incompatible dimensions...., but your answer further clarified the idea for me.
Due to the equations in OpenFOAM are discretized over finite volumes, the fvc::div operator has dimensions of 1/(length^3). -k*fvc::snGrad(phi)*mesh.magSf() has flux units, which is mandatory to be used in fvc::div. Many thanks! |
|
Tags |
electrostaticfoam |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Guide: Writing Equations in LaTeX on the CFD Online Forums | pete | Site Help, Feedback & Discussions | 27 | May 19, 2022 04:19 |
Euler equations vs NS equations | TurbJet | Main CFD Forum | 23 | June 10, 2018 06:11 |
Solving non-linear coupled equations using blockmatrix solver (OpenFOAM-3.1ext) | Rolanzo | OpenFOAM Running, Solving & CFD | 0 | April 12, 2018 21:49 |
modelling Differential equations in a udf | RikardMNorén | Fluent UDF and Scheme Programming | 2 | October 1, 2013 04:36 |
CFD governing equations | m.gos | Main CFD Forum | 0 | April 30, 2011 15:21 |