# Time and Variable Dependent boundary conditions.

 User Name Remember Me Password
 Register Blogs Members List Search Today's Posts Mark Forums Read

 July 16, 2012, 09:42 Time and Variable Dependent boundary conditions. #1 Member   Alpesh Vora Join Date: Jan 2011 Location: Cottbus, Germany Posts: 47 Rep Power: 6 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, 12:36
#2
Assistant Moderator

Bernhard Gschaider
Join Date: Mar 2009
Posts: 3,915
Rep Power: 40
Quote:
 Originally Posted by alvora 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
If the chargeDensity does not change you can do it with fixedGradient. Otherwise I'd (but that is me) use groovyBC with fractionExpression "0" and a gradientExpression

 July 16, 2012, 17:32 #3 Member   Alpesh Vora Join Date: Jan 2011 Location: Cottbus, Germany Posts: 47 Rep Power: 6 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, 17:41 #4 Member   Alpesh Vora Join Date: Jan 2011 Location: Cottbus, Germany Posts: 47 Rep Power: 6 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, 18:49
#5
Assistant Moderator

Bernhard Gschaider
Join Date: Mar 2009
Posts: 3,915
Rep Power: 40
Quote:
 Originally Posted by alvora 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
Normal gradient in groovyBC: that's what I explained in the other posting: set fractionExpression to 0 and you have a pure fixedGradient condition (see definition of the mixed-BC).

d/dn: fixedGradient is always defined in the normal direction of the patch. So you already have that

 July 18, 2012, 06:26 #6 Member   Alpesh Vora Join Date: Jan 2011 Location: Cottbus, Germany Posts: 47 Rep Power: 6 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 mm.abdollahzadeh likes this.

July 18, 2012, 10:02
#7
Assistant Moderator

Bernhard Gschaider
Join Date: Mar 2009
Posts: 3,915
Rep Power: 40
Quote:
 Originally Posted by alvora 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
You're calculating a local variable rhoCharge (BTW: you can omit the @phifreeplate) that is the weighted average of a field rhoCharge. Is that what you want?

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, 09:15
#8
Member

Alpesh Vora
Join Date: Jan 2011
Location: Cottbus, Germany
Posts: 47
Rep Power: 6
Quote:
 Originally Posted by gschaider You're calculating a local variable rhoCharge (BTW: you can omit the @phifreeplate) that is the weighted average of a field rhoCharge. Is that what you want? From what I understand you might want to skip that variable altogether (variables "epsilon=8.8541e-12;" to get an inhomogenous gradient

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, 20:29
#9
Assistant Moderator

Bernhard Gschaider
Join Date: Mar 2009
Posts: 3,915
Rep Power: 40
Quote:
 Originally Posted by alvora 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
If I get your verbal explanation right, then your original formula is right. Although I'm not convinced that it makes sense physically: because I think that the d/dn on each face of the patch depends on the amount of charge on that face (and not on the others . in extreme: one face has all the charges and the others have none: then the solution would be different than from the case where you average the charge onto all the other faces: which is what you're proposing)

In short: groovyBC/swak take no responsibility that you got the physics right. That's on you

 Thread Tools Display Modes Linear Mode

 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 OffTrackbacks are On Pingbacks are On Refbacks are On Forum Rules

 Similar Threads Thread Thread Starter Forum Replies Last Post alfaruk CFX 8 December 3, 2013 17:51 charlotte CFX 4 March 22, 2011 10:14 Pankaj CFX 9 November 23, 2009 05:05 Renaud FLUENT 2 June 21, 2006 19:44 Tudor Miron CFX 15 April 2, 2004 06:18

All times are GMT -4. The time now is 00:05.

 Contact Us - CFD Online - Top