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

EHDFoam

Register Blogs Community New Posts Updated Threads Search

Like Tree23Likes

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   April 23, 2015, 12:32
Default Source code of EHD and multi-region EHD solvers
  #21
New Member
 
Ivo
Join Date: Feb 2012
Posts: 26
Rep Power: 14
Ivooo is on a distinguished road
I have uploaded my interFoamEHD and interFoamEHDMR (the multi-region version) to Dropbox [1]. I have included a number of example and validation cases in the archive.

Please use OpenFOAM 2.1.1 for compiling and using these solvers.

I am currently not actively working on EHD or these solvers, but I hope they can be useful for someone else. Please let me know (e.g. via this forum) if you have additions or suggestions. Also, I am now publishing this via dropbox, but if there's a more sensible way of doing this (I originally wanted to use Google Code, but it seems they're going to stop their services).

Anyway, enjoy!

[1] https://dl.dropboxusercontent.com/u/...Public.tar.bz2
Ivooo is offline   Reply With Quote

Old   April 24, 2015, 17:48
Default
  #22
New Member
 
Brandon Reese
Join Date: Apr 2015
Posts: 4
Rep Power: 11
reesebl is on a distinguished road
I'm going to give it a shot. Having to download OpenFOAM 2.1.1, attempted to get it to work with extend 3.1 and then OF 2.3.1 for a little while before giving up and compiling 2.1.1. I'll probably hack at it some more this weekend to see if I can get it to work with extend 3.1, as that is my currently preferred environment. Pretty excited to see what this can do, as it is directly relevant to a problem I'm working on. Thanks for sharing!
reesebl is offline   Reply With Quote

Old   April 27, 2015, 09:01
Default
  #23
New Member
 
Christian
Join Date: Jan 2014
Posts: 6
Rep Power: 12
chirs is on a distinguished road
Ivo, Thank you for sharing.
chirs is offline   Reply With Quote

Old   April 27, 2015, 15:32
Default foam-extend-3.1 version
  #24
New Member
 
Brandon Reese
Join Date: Apr 2015
Posts: 4
Rep Power: 11
reesebl is on a distinguished road
Ported the interFoamEHD solver to Foam-Extend-3.1. Should compile, run, and validate against that version (it did for me). Let me know how it goes!


Solver with test case (modified slightly to run):
https://drive.google.com/file/d/0B9r...ew?usp=sharing

Validation graph:
https://drive.google.com/file/d/0B9r...ew?usp=sharing
Mojtaba.a, PonchO and babakflame like this.
reesebl is offline   Reply With Quote

Old   March 3, 2016, 00:59
Default
  #25
Senior Member
 
Bobby
Join Date: Oct 2012
Location: Michigan
Posts: 454
Rep Power: 16
babakflame is on a distinguished road
Hey Fellows

I have a question about this solver. Any hint is appreciated.

This solver solves the charge density transport equation. i.e. \rho_e and Gauss's law in the electrostatic equation section and in the zero folder it receives the Boundary condition for charge density \rho_e.

However, in my case charge density is unknown and I have the boundary values for electric potential \phi. This solver computes \phi values from charge density. How about my case?

I mean can it do the inverse route? i.e. calculating \rho_e from \phi values?

Regards
babakflame is offline   Reply With Quote

Old   March 3, 2016, 04:28
Default
  #26
New Member
 
Ivo
Join Date: Feb 2012
Posts: 26
Rep Power: 14
Ivooo is on a distinguished road
So apparently I forgot to put a link here to the publication that contains more details on the code: http://link.springer.com/article/10....404-015-1581-5

To answer your question, Babak, if you don't know the charge field then set it to uniform 0 (and boundary conditions to zeroGradient). You can set the desired potential in the 0/phi file.Charges (positive and negative) will develop from the potential field, which will affect the potential field.

What I understand from your post is that you can simply set the boundary condition values for the potential, and you're on your way.
Xinze, babakflame and sabiru like this.
Ivooo is offline   Reply With Quote

Old   March 4, 2016, 19:28
Default
  #27
Senior Member
 
Bobby
Join Date: Oct 2012
Location: Michigan
Posts: 454
Rep Power: 16
babakflame is on a distinguished road
Thanks Dr. Roghair

Just another question:

In your tutorial cases, It seems that all cases are whether dielectric or perfect conductor. Can we simulate a case with this code that two mediums (wall + fluid over it) are neither dielectric nor conductor; I mean both boundaries have finite values for permmitivity and conductivity ?
babakflame is offline   Reply With Quote

Old   March 7, 2016, 05:39
Default
  #28
New Member
 
Ivo
Join Date: Feb 2012
Posts: 26
Rep Power: 14
Ivooo is on a distinguished road
Quote:
Originally Posted by babakflame View Post
Thanks Dr. Roghair

Just another question:

In your tutorial cases, It seems that all cases are whether dielectric or perfect conductor. Can we simulate a case with this code that two mediums (wall + fluid over it) are neither dielectric nor conductor; I mean both boundaries have finite values for permmitivity and conductivity ?
Well, that would take a few development steps; I have not included the charge transport equation in the solids region (since I needed a dielectric layer, non conductive), so you'd have to add it, and couple it with the appropriate boundary condition.

I have used the interFoam as a fluid solver; since you're mentioning a single fluid, I'm not sure how the simulation would behave. Probably it'll do just fine, but I have no experience with interFoam solver without an interface.
babakflame likes this.
Ivooo is offline   Reply With Quote

Old   May 18, 2016, 13:08
Default
  #29
Senior Member
 
Bobby
Join Date: Oct 2012
Location: Michigan
Posts: 454
Rep Power: 16
babakflame is on a distinguished road
Dear Fellows

I want to implement the velocity boundary condition at the wall as a function of electric potential gradient \frac {\partial \Phi} {\partial y} (another variable in the solver which is present in 0 folder). Can anyone hint me how can I do this?

Regards
babakflame is offline   Reply With Quote

Old   May 18, 2016, 13:41
Default
  #30
Super Moderator
 
Tobi's Avatar
 
Tobias Holzmann
Join Date: Oct 2010
Location: Bad Wörishofen
Posts: 2,711
Blog Entries: 6
Rep Power: 52
Tobi has a spectacular aura aboutTobi has a spectacular aura aboutTobi has a spectacular aura about
Send a message via ICQ to Tobi Send a message via Skype™ to Tobi
Hi Bobi,

for that problem you have to think about the boundary type. As far as I understand you want to set the velocity at the faces as fixedValues but changing with the electric potential.

To do this, you have to build a new BC and get access to the field of the electric potential, like:
Code:
const volVectorField pot = this->db(). ...
Then you have to access to the face values of pot and can use this for doing your stuff.

But at the moment I do not know what kind of BC you want to implement or how you calculate the velocity at the faces. Maybe I miss understand you.
babakflame likes this.
__________________
Keep foaming,
Tobias Holzmann
Tobi is offline   Reply With Quote

Old   May 18, 2016, 15:05
Default
  #31
Senior Member
 
Bobby
Join Date: Oct 2012
Location: Michigan
Posts: 454
Rep Power: 16
babakflame is on a distinguished road
Hi Tobi

Many thanks for your fast reply. For clarifying my question; lets explain it completely:

I want to implement a slip velocity BC at the wall which the value of velocity along the wall (tangential velocity) is:

V= \frac {\varepsilon} {{4} \pi \mu } \, \frac {\partial \Phi}{\partial y} (\Phi + {V_0})

In the above relation {\varepsilon} & {V_0} are constants, {\mu} is dynamic viscosity and {\Phi} (electric potential) is another variable present in 0 folder and has its own boundary conditions. {y} is the direction along the wall.

Other components of velocity are zero.

Regards
babakflame is offline   Reply With Quote

Old   May 19, 2016, 04:01
Default
  #32
Super Moderator
 
Tobi's Avatar
 
Tobias Holzmann
Join Date: Oct 2010
Location: Bad Wörishofen
Posts: 2,711
Blog Entries: 6
Rep Power: 52
Tobi has a spectacular aura aboutTobi has a spectacular aura aboutTobi has a spectacular aura about
Send a message via ICQ to Tobi Send a message via Skype™ to Tobi
Hi Bobi,

if you have the position along the wall, you need some reference point, aren't you, or do you base the derivative on the face neighbors? You can get the face center coordinates easily. But at the moment I do not know how to get the neighbors. I think there is a function that returns the neighbor faces. Then you have to delta calculate dy and dphi ... thats it (more or less)
__________________
Keep foaming,
Tobias Holzmann
Tobi is offline   Reply With Quote

Old   May 20, 2016, 22:10
Default
  #33
Senior Member
 
Bobby
Join Date: Oct 2012
Location: Michigan
Posts: 454
Rep Power: 16
babakflame is on a distinguished road
Hi Tobi

Iam thinking of such a code as follows to be used as codedFixedValue boundary condition or sth like that. Can you help me with the possible errors in the code?

Code:
  #{
    const volScalarField Phi = this->db().time.value()

    volScalarField delta ("delta" , Phi & mesh.C() - Phi & mesh.Cn())

    volScalarField partial ("partial" , delta/ (mesh.C() - mesh.Cn())

    operator == partial * (Phi + B)

  #};
Here B refers to V_0, and partial refers to \frac {\partial \Phi}{\partial y}

mesh.C() locates the cell center and mesh.Cn() refers to neighbouring cell center. However , I want the upper cell for calculating the derivative
babakflame is offline   Reply With Quote

Old   May 21, 2016, 06:10
Default
  #34
Super Moderator
 
Tobi's Avatar
 
Tobias Holzmann
Join Date: Oct 2010
Location: Bad Wörishofen
Posts: 2,711
Blog Entries: 6
Rep Power: 52
Tobi has a spectacular aura aboutTobi has a spectacular aura aboutTobi has a spectacular aura about
Send a message via ICQ to Tobi Send a message via Skype™ to Tobi
Time value is a scalar.
Cn is neighbour? It should be a list of points, partial is a sclar field and should be named delta.

Note delta in foam is 1/delta.
In operator the brackets are missing.

Operator==(foo)
__________________
Keep foaming,
Tobias Holzmann
Tobi is offline   Reply With Quote

Old   August 9, 2016, 19:57
Default
  #35
Senior Member
 
Bobby
Join Date: Oct 2012
Location: Michigan
Posts: 454
Rep Power: 16
babakflame is on a distinguished road
Dear Fellows

has anybody done a mixed electroosmotic/pressure driven flow case?
I have made some some changes to EHDFoam and simulated the above case, however, I experience some problems in setting it correctly.
Does anybody have any previous experiences?

Regards
babakflame is offline   Reply With Quote

Old   October 14, 2016, 06:27
Post
  #36
New Member
 
mobina.h.miri
Join Date: Jul 2015
Posts: 3
Rep Power: 11
mobina is on a distinguished road
Hi former,
I want to simulate droplet formation in electric field (DOD= drop on demand). I use OF2.1.1 and interFoamEHD solver. I tried several BCs but drop can not be separated from the nozzle.any one can help me to choose BC for rhoE,when we use fixed value: zero and zerogradient?
about momentumPredictor is should be yes or no?
excuse me for my english
mobina is offline   Reply With Quote

Old   January 22, 2017, 10:55
Default
  #37
New Member
 
arash
Join Date: Jan 2015
Posts: 5
Rep Power: 11
arashma is on a distinguished road
I have succeeded to install openFoam 1.5,Then i do the Descriptions in The solver folder Step by Step,first i copy the EHDtwoPhaseMixture.C & EHDtwoPhaseMixture.H in to the ~/OpenFOAM/OpenFOAM-1.5/src/transportModels/incompressible folder,Then i type in Terminal "wmake libso" and tried to compile EHDtwoPhaseMixture but the error was:
SOURCE=EHDTwoPhaseMixture/EHDtwoPhaseMixture.C ; g++ -m64 -Dlinux64 -DDP -Wall -Wno-strict-aliasing -Wextra -Wno-unused-parameter -Wold-style-cast -march=opteron -O3 -DNoRepository -ftemplate-depth-40 -I.. -I/home/mein/OpenFOAM/OpenFOAM-1.5/src/finiteVolume/lnInclude -IlnInclude -I. -I/home/mein/OpenFOAM/OpenFOAM-1.5/src/OpenFOAM/lnInclude -I/home/mein/OpenFOAM/OpenFOAM-1.5/src/OSspecific/Unix/lnInclude -fPIC -c $SOURCE -o Make/linux64Gcc43DPOpt/EHDtwoPhaseMixture.o
In file included from EHDTwoPhaseMixture/EHDtwoPhaseMixture.C:27:
EHDTwoPhaseMixture/EHDtwoPhaseMixture.H:190: error: conflicting return type specified for ‘virtual const Foam::volScalarField& Foam::EHDtwoPhaseMixture::nu() const’
../incompressible/transportModel/transportModel.H:86: error: overriding ‘virtual Foam::tmp<Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> > Foam::transportModel::nu() const’
make: *** [Make/linux64Gcc43DPOpt/EHDtwoPhaseMixture.o] Error 1
make: *** Waiting for unfinished jobs....
Then i do some changes that Salehda(David) suggested that in this link :
EHDFoam
it means i changed :
//- Return the kinematic laminar viscosity
virtual const volScalarField& nu() const
{
return nu_;
}
to
//- Return the kinematic laminar viscosity
virtual tmp<volScalarField& nu() const
{
return nu_;
}
but still i have this log error:
SOURCE=EHDTwoPhaseMixture/EHDtwoPhaseMixture.C ; g++ -m64 -Dlinux64 -DDP -Wall -Wno-strict-aliasing -Wextra -Wno-unused-parameter -Wold-style-cast -march=opteron -O3 -DNoRepository -ftemplate-depth-40 -I.. -I/home/mein/OpenFOAM/OpenFOAM-1.5/src/finiteVolume/lnInclude -IlnInclude -I. -I/home/mein/OpenFOAM/OpenFOAM-1.5/src/OpenFOAM/lnInclude -I/home/mein/OpenFOAM/OpenFOAM-1.5/src/OSspecific/Unix/lnInclude -fPIC -c $SOURCE -o Make/linux64Gcc43DPOpt/EHDtwoPhaseMixture.o
In file included from EHDTwoPhaseMixture/EHDtwoPhaseMixture.C:27:
EHDTwoPhaseMixture/EHDtwoPhaseMixture.H:190: error: conflicting return type specified for ‘virtual const Foam::volScalarField& Foam::EHDtwoPhaseMixture::nu() const’
../incompressible/transportModel/transportModel.H:86: error: overriding ‘virtual Foam::tmp<Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> > Foam::transportModel::nu() const’
make: *** [Make/linux64Gcc43DPOpt/EHDtwoPhaseMixture.o] Error 1
make: *** Waiting for unfinished jobs....
i do wclean before any changes but still it doesnt any effect on the compiling.
thanks
arashma is offline   Reply With Quote

Old   January 22, 2017, 15:34
Default
  #38
Senior Member
 
Bobby
Join Date: Oct 2012
Location: Michigan
Posts: 454
Rep Power: 16
babakflame is on a distinguished road
Dear Arash

You don't need to write your post on different threads. The people who answer, will see them at the first site.

If you had installed the 2.1.x version, it would be much easier for ya now.

However, for this problem, as ya can see:

Code:
error: overriding ‘virtual Foam::tmp<Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> > Foam::transportModel::nu() const’
The problem is related to a new definition for the virtual function.
My response might not be perfect, but this is how I deal with it.
You have two options.
1) delete the word virtual
2) try to look at the definition of this virtual function in the $FoamSRC folder and be compatible with it.

PS: If you had installed the 2.1.x version, none of these would pop up at all.

Last edited by babakflame; January 22, 2017 at 16:55.
babakflame is offline   Reply With Quote

Old   July 4, 2017, 12:12
Default Validity of equation of charge transport ?
  #39
New Member
 
Alireza Rajabi
Join Date: Jul 2017
Posts: 1
Rep Power: 0
AlirezaRajabi is on a distinguished road
Quote:
Originally Posted by Ivooo View Post
I have uploaded my interFoamEHD and interFoamEHDMR (the multi-region version) to Dropbox [1]. I have included a number of example and validation cases in the archive.

Please use OpenFOAM 2.1.1 for compiling and using these solvers.

I am currently not actively working on EHD or these solvers, but I hope they can be useful for someone else. Please let me know (e.g. via this forum) if you have additions or suggestions. Also, I am now publishing this via dropbox, but if there's a more sensible way of doing this (I originally wanted to use Google Code, but it seems they're going to stop their services).

Anyway, enjoy!

[1] https://dl.dropboxusercontent.com/u/...Public.tar.bz2
dear Ivo,

I know that the post is for a long time ago But Im am new to the field and I recently saw your solver.
I believe that the third equation in your model is the charge conservation equation. The original form of this equation consist of divergence (\sigma E), but it is (\sigma / \varepsilon) \rho_e in the solver. in the case of multiphase flow the electrical properties varies across the interface and hence \sigma and \varepsilon cant be outside the divergence term.

I mean divergence (\sigma E) is not equal to \sigma * divergence ( E) and therefore (\sigma / \varepsilon) \rho_e is not equal to divergence (\sigma E) in general?

could you please explain how using this term is justified in the solver ?

thank you very much
AlirezaRajabi is offline   Reply With Quote

Old   July 25, 2017, 07:07
Default
  #40
New Member
 
Ivo
Join Date: Feb 2012
Posts: 26
Rep Power: 14
Ivooo is on a distinguished road
Nice to see that this thread is active every once in a while

Here's an updated link to the code, it seems Dropbox put it on private some time ago.
https://www.dropbox.com/s/1n8hmn08p6...c.tar.bz2?dl=0
Ivooo is offline   Reply With Quote

Reply


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



All times are GMT -4. The time now is 10:49.