|
[Sponsors] |
Time and Variable Dependent boundary conditions. |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
July 16, 2012, 10:42 |
Time and Variable Dependent boundary conditions.
|
#1 |
Member
Alpesh
Join Date: Jan 2011
Location: Germany
Posts: 52
Rep Power: 15 |
Hello everyones,
I want to implement new boundary conditions for electrohydrodynamics flow.. There is a conductive plate which is immersed in unipolar charge flow.. I want boundary condition as below on conductive plate surface.. d(Voltage)/dn=(chargeDensity)/epsilon, where, voltage and charge density are variables parameter and epsilon is constant dimension scalar.. d/dn is normal gradient to surface.. for voltage and charge density, equations are separate.. But, voltage boundary condition on plate surface is depended on charge density... Can any one tell me that How I can implement? Thanx in advance alpesh |
|
July 16, 2012, 13:36 |
|
#2 | |
Assistant Moderator
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51 |
Quote:
|
||
July 16, 2012, 18:32 |
|
#3 |
Member
Alpesh
Join Date: Jan 2011
Location: Germany
Posts: 52
Rep Power: 15 |
Hello Bernhard Gschaider,
Thank you very much for reply.. In my case, chargeDensity is also changing with time... I thought to do with groovyBC.. but I dont know how to do in openfoam210.. n moreover I don't know how to implement normal gradient in groovyBC. Because, New voltage surface gradient is equal to chargeDensity/epsilon.. I dont know what to do with d/dn? Can I consider as new voltage on boundary patch is equal to new_chargeDensity/(epsilon*patch.deltaCoeffs()) ? Kind Regards Alpesh |
|
July 16, 2012, 18:41 |
|
#4 |
Member
Alpesh
Join Date: Jan 2011
Location: Germany
Posts: 52
Rep Power: 15 |
Hello Bernhard Gschaider,
I also tried with this way.. but don't know that is it correct or not? I put below code in one header file and make link with source file in time loop.. label phifreePatchID = mesh.boundaryMesh().findPatchID("phifreeplate"); //label patchId=patch().boundaryMesh().lookupPatchID(patch Name); fvPatchScalarField& rho_CD = rhoCharge.boundaryField()[phifreePatchID]; fvPatchScalarField& platevoltage = voltage.boundaryField()[phifreePatchID]; const fvsPatchVectorField& centre = mesh.Cf().boundaryField()[phifreePatchID]; const fvsPatchVectorField& normal = mesh.Sf().boundaryField()[phifreePatchID]; //const surfaceScalarField& delta = mesh.boundaryMesh()[phifreePatchID].snGrad(); const polyPatch& cPatch = mesh.boundaryMesh()[phifreePatchID]; scalar patchArea = 0.0; scalar r_charge =0.0; forAll(cPatch, faceI) { patchArea += mesh.magSf().boundaryField()[phifreePatchID][faceI]; r_charge += rhoCharge.boundaryField()[phifreePatchID][faceI]; } forAll (platevoltage, faceI) { platevoltage[faceI]= r_charge/(patchArea); } I wrote last equations as: forAll (platevoltage, faceI) { platevoltage[faceI]= r_charge/(epsilon0*patchArea*mesh.boundaryMesh()[phifreePatchID].snGrad()); } and instead of snGrad, I also used .deltaCoeffs(), but I got error in both case.. Can you tell me that this type of way is correct or not? and what mistake I am doing in code? Thank in advance kind Regards Alpesh |
|
July 17, 2012, 19:49 |
|
#5 | |
Assistant Moderator
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51 |
Quote:
d/dn: fixedGradient is always defined in the normal direction of the patch. So you already have that |
||
July 18, 2012, 07:26 |
|
#6 |
Member
Alpesh
Join Date: Jan 2011
Location: Germany
Posts: 52
Rep Power: 15 |
Hi Bernhard Gschaider,
Thank you very much for reply, I implemented as below: phifreeplate { type groovyBC; gradientExpression "(rhoCharge/epsilon)"; variables "rhoCharge@phifreeplate=sum(rhoCharge*mag(Sf() ))/sum(mag(Sf()));epsilon=8.8541e-12;"; value uniform 0; fractionExpression "0"; } Can you tell me that is this correct or not, please? Kind Regards Alpesh VORA |
|
July 18, 2012, 11:02 |
|
#7 | |
Assistant Moderator
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51 |
Quote:
From what I understand you might want to skip that variable altogether (variables "epsilon=8.8541e-12;" to get an inhomogenous gradient |
||
July 19, 2012, 10:15 |
|
#8 | |
Member
Alpesh
Join Date: Jan 2011
Location: Germany
Posts: 52
Rep Power: 15 |
Quote:
Yes, I need average chargeDensity of only phifreeplates. I mean, a total charge which deposited on phifreeplate divide by total area of phifree plate.. question is: does above BC only calculating charge on phifree plate or whole domain? Can you tell me last thing again, please? i didn't get why I should have to skip epsilon variable, please? Kind Regards A |
||
July 19, 2012, 21:29 |
|
#9 | |
Assistant Moderator
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51 |
Quote:
In short: groovyBC/swak take no responsibility that you got the physics right. That's on you |
||
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Difficulty in calculating angular velocity of Savonius turbine simulation | alfaruk | CFX | 14 | March 17, 2017 07:08 |
emag beta feature: charge density | charlotte | CFX | 4 | March 22, 2011 10:14 |
RPM in Wind Turbine | Pankaj | CFX | 9 | November 23, 2009 05:05 |
Time dependent boundary conditions | Renaud | FLUENT | 2 | June 21, 2006 20:44 |
New topic on same subject - Flow around race car | Tudor Miron | CFX | 15 | April 2, 2004 07:18 |