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

Modifying buoyantBoussinesqPimpleFoam

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

Like Tree5Likes

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   October 21, 2021, 09:48
Default
  #21
Member
 
Alpesh Vora
Join Date: Jan 2011
Location: Wuppertal, Germany
Posts: 48
Rep Power: 12
alvora is on a distinguished road
Hi,

I think the fluid density (rho) is not at all required to solve the current continuity equation (charge conservation equation).

Let's say,
rhoE - Space charge density [C/m or A-s/m],
mu - electrical mobility [A-s/kg]
ePot - electrical potential [kg-m/(A-s)]
De - Diffusion coefficient [m/s]
U - fluid velocity [m/s]

then
Current continuity equation:

fvScalarMatrix rhoEEqn
(
fvm::ddt(rhoE) //Time derivative
+ fvm::div(rhoFlux, rhoE) //Convective term - rhoFlux is surfaceScalarField
- fvm::laplacian(D, rhoE) //Diffusive Term, -/+ sign for +/- space charge density
);
rhoEEqn.solve();

where,
surfaceScalarField rhoFlux = - mu*mesh.magSf()*fvc::snGrad(ePot)

If the space charge density is also dragged by the fluid velocity, then
surfaceScalarField rhoFlux = - mu*mesh.magSf()*fvc::snGrad(ePot) + fvc::linearInterpolate(U)&mesh.Sf()


Isn't it this way? correct me if I am wrong or missing something.


Kind regards
Alpesh
alvora is offline   Reply With Quote

Reply

Tags
buoyantboussinesqpimple, modify solver, openfoam v6

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
Modifying the laplacian operator mlawson OpenFOAM Running, Solving & CFD 22 July 16, 2018 05:56
Error while modifyinG reactingFoam!! sonGoku OpenFOAM Pre-Processing 0 May 27, 2018 14:57
Modifying the convection term in IcoFOAM code fluidflowsteel OpenFOAM Programming & Development 0 November 28, 2017 06:51
Modifying sonicFoam to add EM terms Alexee OpenFOAM Programming & Development 0 February 11, 2015 11:55
modifying radial distribution function ravindra FLUENT 2 September 2, 2014 15:03


All times are GMT -4. The time now is 02:24.