Time and Variable Dependent boundary conditions.
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 
Quote:

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 
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 
Quote:
d/dn: fixedGradient is always defined in the normal direction of the patch. So you already have that 
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.8541e12;"; value uniform 0; fractionExpression "0"; } Can you tell me that is this correct or not, please? Kind Regards Alpesh VORA 
Quote:
From what I understand you might want to skip that variable altogether (variables "epsilon=8.8541e12;";) to get an inhomogenous gradient 
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 
Quote:
In short: groovyBC/swak take no responsibility that you got the physics right. That's on you 
All times are GMT 4. The time now is 08:54. 