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

New boundary condition

Register Blogs Community New Posts Updated Threads Search

Like Tree2Likes

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   November 30, 2005, 16:07
Default I need to implement Johnson an
  #1
Senior Member
 
Alberto Passalacqua
Join Date: Mar 2009
Location: Ames, Iowa, United States
Posts: 1,912
Rep Power: 36
alberto will become famous soon enoughalberto will become famous soon enough
I need to implement Johnson and Jacksnon boundary conditions in twoPhaseEulerFoam:



Is there something similar in OpenFoam to take as a starting point?

Thanks,
Alberto
__________________
Alberto Passalacqua

GeekoCFD - A free distribution based on openSUSE 64 bit with CFD tools, including OpenFOAM. Available as in both physical and virtual formats (current status: http://albertopassalacqua.com/?p=1541)
OpenQBMM - An open-source implementation of quadrature-based moment methods.

To obtain more accurate answers, please specify the version of OpenFOAM you are using.
alberto is offline   Reply With Quote

Old   December 1, 2005, 04:04
Default Hi, We had a similar bc in
  #2
Super Moderator
 
niklas's Avatar
 
Niklas Nordin
Join Date: Mar 2009
Location: Stockholm, Sweden
Posts: 693
Rep Power: 29
niklas will become famous soon enoughniklas will become famous soon enough
Hi,

We had a similar bc in our version of the two-phase code, but I decided to remove it from the official version, since it makes the calculations
even more prone to crash/oscillate.

I will see if i can dig out the old code and send it to you.

N
niklas is offline   Reply With Quote

Old   December 1, 2005, 05:38
Default Hello, yes, I know these boun
  #3
Senior Member
 
Alberto Passalacqua
Join Date: Mar 2009
Location: Ames, Iowa, United States
Posts: 1,912
Rep Power: 36
alberto will become famous soon enoughalberto will become famous soon enough
Hello,
yes, I know these boundary conditions can give such a kind of problems, but they're widely used in risers simulations.

It would be of great help if I could see your code :-)

Alberto
__________________
Alberto Passalacqua

GeekoCFD - A free distribution based on openSUSE 64 bit with CFD tools, including OpenFOAM. Available as in both physical and virtual formats (current status: http://albertopassalacqua.com/?p=1541)
OpenQBMM - An open-source implementation of quadrature-based moment methods.

To obtain more accurate answers, please specify the version of OpenFOAM you are using.
alberto is offline   Reply With Quote

Old   December 1, 2005, 07:28
Default OK, with the help of Rasmus I
  #4
Super Moderator
 
niklas's Avatar
 
Niklas Nordin
Join Date: Mar 2009
Location: Stockholm, Sweden
Posts: 693
Rep Power: 29
niklas will become famous soon enoughniklas will become famous soon enough
OK, with the help of Rasmus I got these
particleSlip.tgz
The particleSlip bc.

To use this you just compile the library and add
the -lparticleSlip to the Make/options of your code and recompile that.

and to use it you set
type particleSlip
in the Ua bc's

If you want to postProcess the Ua variable you need to add the -lparticleSlip to the foamUser lib.

Its a partial slip conditions which is calculated in the .C file, a valueFraction() of 0 corresponds to the full slip condtion and 1 to a no-slip (or the fixedValue of (0 0 0))

The bc also needs some input from the transportProperties dictionary, da and phi0,
the diameter of the particles and their sphericity.

It's just possible to set the tangential component at the wall, since the normal should be zero.

...and of course you can rename it to something else then particleSlip, but it should be pretty straightforward to use you own equation for the 'slipperyness'.

N
chunleili likes this.
niklas is offline   Reply With Quote

Old   December 1, 2005, 08:39
Default Thank you and Rasmus. I'll add
  #5
Senior Member
 
Alberto Passalacqua
Join Date: Mar 2009
Location: Ames, Iowa, United States
Posts: 1,912
Rep Power: 36
alberto will become famous soon enoughalberto will become famous soon enough
Thank you and Rasmus. I'll add the Theta condition and post back the code as soon as possible.

Alberto
__________________
Alberto Passalacqua

GeekoCFD - A free distribution based on openSUSE 64 bit with CFD tools, including OpenFOAM. Available as in both physical and virtual formats (current status: http://albertopassalacqua.com/?p=1541)
OpenQBMM - An open-source implementation of quadrature-based moment methods.

To obtain more accurate answers, please specify the version of OpenFOAM you are using.
alberto is offline   Reply With Quote

Old   December 2, 2005, 10:52
Default Hello, if you consider the pa
  #6
Senior Member
 
Alberto Passalacqua
Join Date: Mar 2009
Location: Ames, Iowa, United States
Posts: 1,912
Rep Power: 36
alberto will become famous soon enoughalberto will become famous soon enough
Hello,
if you consider the partial slip boundary condition in the form:

U - a*dU = 0

where dU is the gradient in the normal direction, and a in [0, +inf[, is valueFraction defined as:

valueFraction = a/(1-a)

If not, what's the definition of valueFraction?

Thanks,
Alberto
__________________
Alberto Passalacqua

GeekoCFD - A free distribution based on openSUSE 64 bit with CFD tools, including OpenFOAM. Available as in both physical and virtual formats (current status: http://albertopassalacqua.com/?p=1541)
OpenQBMM - An open-source implementation of quadrature-based moment methods.

To obtain more accurate answers, please specify the version of OpenFOAM you are using.
alberto is offline   Reply With Quote

Old   December 2, 2005, 11:45
Default Hola, Not 100 percent sure,
  #7
Super Moderator
 
niklas's Avatar
 
Niklas Nordin
Join Date: Mar 2009
Location: Stockholm, Sweden
Posts: 693
Rep Power: 29
niklas will become famous soon enoughniklas will become famous soon enough
Hola,

Not 100 percent sure, but I'd say its like this:

valueFraction*U + (1-valueFraction)*dU = 0

N
niklas is offline   Reply With Quote

Old   December 2, 2005, 15:36
Default Hello, I'm a bit confused bec
  #8
Senior Member
 
Alberto Passalacqua
Join Date: Mar 2009
Location: Ames, Iowa, United States
Posts: 1,912
Rep Power: 36
alberto will become famous soon enoughalberto will become famous soon enough
Hello,
I'm a bit confused because the user's guide, pag. 148, says we have a complete slip b.c. for valueFraction = 1, so it can't be

valueFraction*U + (1-valueFraction)*dU = 0

because, for valueFraction = 1, it gives the no-slip b.c. and not the slip one. This is the reason I thought to something like:

(1-valueFraction)*U + valureFraction*dU = 0

but I'm not sure.

Any confirmation is welcome :-)

Thanks again,
Alberto
__________________
Alberto Passalacqua

GeekoCFD - A free distribution based on openSUSE 64 bit with CFD tools, including OpenFOAM. Available as in both physical and virtual formats (current status: http://albertopassalacqua.com/?p=1541)
OpenQBMM - An open-source implementation of quadrature-based moment methods.

To obtain more accurate answers, please specify the version of OpenFOAM you are using.
alberto is offline   Reply With Quote

Old   December 2, 2005, 23:10
Default I tried to apply the condition
  #9
Senior Member
 
Alberto Passalacqua
Join Date: Mar 2009
Location: Ames, Iowa, United States
Posts: 1,912
Rep Power: 36
alberto will become famous soon enoughalberto will become famous soon enough
I tried to apply the condition you sent to me, but when I start the solver, I get this error:

Create mesh for time = 0


Reading environmentalProperties
Reading transportProperties



--> FOAM FATAL ERROR :
request for volScalarField alpha from objectRegistry region0 failed
available objects of type volScalarField are

0
(
)


From function objectRegistry::lookupObject<type>(const word&) const
in file /home/dm2/henry/OpenFOAM/OpenFOAM-1.2/src/OpenFOAM/lnInclude/objectR egistryTemplates.C at line 122.


Also, is it possible to use data contained in the phase object and use the kineticProperties dictionary instead of transportProperties?

Alberto
__________________
Alberto Passalacqua

GeekoCFD - A free distribution based on openSUSE 64 bit with CFD tools, including OpenFOAM. Available as in both physical and virtual formats (current status: http://albertopassalacqua.com/?p=1541)
OpenQBMM - An open-source implementation of quadrature-based moment methods.

To obtain more accurate answers, please specify the version of OpenFOAM you are using.
alberto is offline   Reply With Quote

Old   December 3, 2005, 09:09
Default Hi, I might possibly have the
  #10
Super Moderator
 
niklas's Avatar
 
Niklas Nordin
Join Date: Mar 2009
Location: Stockholm, Sweden
Posts: 693
Rep Power: 29
niklas will become famous soon enoughniklas will become famous soon enough
Hi,
I might possibly have the definition mixed up,but the easiest wasy to check is to run the icoFoam cavity tutorial with a fixed valueFraction and ascii format and check the values on the wall patch.

You're picking up the wrong database, the code I sent is from before the database was re-written and I dont know the new name (Mattijs does though Im sure)

Of course you can use the kineticProeprties dictionary instead, just change the name in the particleSlip.C file.

N
niklas is offline   Reply With Quote

Old   December 3, 2005, 11:07
Default The kineticTheoryProperties di
  #11
Senior Member
 
Alberto Passalacqua
Join Date: Mar 2009
Location: Ames, Iowa, United States
Posts: 1,912
Rep Power: 36
alberto will become famous soon enoughalberto will become famous soon enough
The kineticTheoryProperties dictionary seems to be unknown: it gives another fatal error where it states it can't find the dictionary. But this is probably related to the database issue too.

About the database, the only access (if I'm not wrong :-)) the code does to it should be through db(), but no name is specified there.
Also I looked at other BC's implementation and the same syntax is adopted.
Where do you choose the dictionary you pick?

Thanks and sorry if I'm boring :-)
Alberto
__________________
Alberto Passalacqua

GeekoCFD - A free distribution based on openSUSE 64 bit with CFD tools, including OpenFOAM. Available as in both physical and virtual formats (current status: http://albertopassalacqua.com/?p=1541)
OpenQBMM - An open-source implementation of quadrature-based moment methods.

To obtain more accurate answers, please specify the version of OpenFOAM you are using.
alberto is offline   Reply With Quote

Old   December 9, 2005, 03:56
Default Hi, Just tested the code an
  #12
Super Moderator
 
niklas's Avatar
 
Niklas Nordin
Join Date: Mar 2009
Location: Stockholm, Sweden
Posts: 693
Rep Power: 29
niklas will become famous soon enoughniklas will become famous soon enough
Hi,

Just tested the code and it works, but I was able to reproduce the error message.
Here's the bc input you need

walls
{
type particleSlip;
value uniform (0 0 0);
}

I'm guessing that you didnt include the value-statement, remember that if you want partial slip, you need a reference velocity.

N
niklas is offline   Reply With Quote

Old   December 10, 2005, 20:06
Default You're right Niklas. I forgot
  #13
Senior Member
 
Alberto Passalacqua
Join Date: Mar 2009
Location: Ames, Iowa, United States
Posts: 1,912
Rep Power: 36
alberto will become famous soon enoughalberto will become famous soon enough
You're right Niklas. I forgot the value statement.

Thank you!
Alberto
__________________
Alberto Passalacqua

GeekoCFD - A free distribution based on openSUSE 64 bit with CFD tools, including OpenFOAM. Available as in both physical and virtual formats (current status: http://albertopassalacqua.com/?p=1541)
OpenQBMM - An open-source implementation of quadrature-based moment methods.

To obtain more accurate answers, please specify the version of OpenFOAM you are using.
alberto is offline   Reply With Quote

Old   February 16, 2006, 13:23
Default How does one obtain the tangen
  #14
New Member
 
Jeff Allen
Join Date: Mar 2009
Posts: 11
Rep Power: 17
jballen is on a distinguished road
How does one obtain the tangent vector to a given face. I know for example that Sf() gives the normal vector.

Thanks
Jeff
jballen is offline   Reply With Quote

Old   February 16, 2006, 17:01
Default 1) Take any vector, a 2) get
  #15
Senior Member
 
Hrvoje Jasak
Join Date: Mar 2009
Location: London, England
Posts: 1,907
Rep Power: 33
hjasak will become famous soon enough
1) Take any vector, a
2) get a face normal n; if not already available, do Sf/mag(Sf)
3) the tangential component is:

a_t = a - n*(n & a)

Be careful: if you choose a to be parallel with n, you will get a zero vector. In that case, try a different a

Enjoy,

Hrv
utkunun likes this.
__________________
Hrvoje Jasak
Providing commercial FOAM/OpenFOAM and CFD Consulting: http://wikki.co.uk
hjasak is offline   Reply With Quote

Old   March 26, 2009, 21:23
Default
  #16
New Member
 
Cynthia Poon
Join Date: Mar 2009
Posts: 4
Rep Power: 17
Cynthia Poon is on a distinguished road
Hi Niklas and everybody,

I've got some problem when post-processing the boundary condition. The error message in ParaView show that the "alpha" request from objectRegistry region0 failed.

Referring to #4 post, I find "If you want to postProcess the Ua variable you need to add the -lparticleSlip to the foamUser lib."

Can I ask where is that foamUser lib for post-processing?
I am sorry if my question is too silly.

Regards,
Cynthia
Cynthia Poon is offline   Reply With Quote

Old   April 9, 2009, 12:58
Default
  #17
Senior Member
 
Dr. Alexander Vakhrushev
Join Date: Mar 2009
Posts: 256
Blog Entries: 1
Rep Power: 19
makaveli_lcf is on a distinguished road
Send a message via ICQ to makaveli_lcf
Hi all!

I'm trying to implement heat convective BC like at http://web.njit.edu/topics/Prog_Lang...ml/node198.htm

So we have as a parameters for applied BC:
h_ext - external heat transfer coefficient
T_ext - external heat-sink temperature
k_f - thermal conductivity of liquid

On the one hand, from Fourier's law heat flux q is equal
q = - k_f * d(T)/dn (1)

On the other hand,
q = h_ext * (T_ext - T_w) (2)

where T_w is wall temperature, which should be calculated. Combining (1) and (2), we get BC in form:

T - T_ext - k_f /h_f * d(T)/dn = 0 (3)

How to implement this BC in OpenFOAM? I tried to used "mixed" BC, setting refValue to T_ext, refGradient to zero, and calculating valueFraction as

valueFraction = 1/(1+k_f/h_f)

But at this stage I'm sure that it is not properly. Waiting for your suggestions!

Thank you
__________________
Best regards,

Dr. Alexander VAKHRUSHEV

Christian Doppler Laboratory for "Metallurgical Applications of Magnetohydrodynamics"

Simulation and Modelling of Metallurgical Processes
Department of Metallurgy
University of Leoben

http://smmp.unileoben.ac.at
makaveli_lcf is offline   Reply With Quote

Old   April 14, 2009, 04:03
Default
  #18
Senior Member
 
Dr. Alexander Vakhrushev
Join Date: Mar 2009
Posts: 256
Blog Entries: 1
Rep Power: 19
makaveli_lcf is on a distinguished road
Send a message via ICQ to makaveli_lcf
So first I solved with a mixed type, and later made own BC on the basis of fixed gradient type, considering it in form

dT/dn = h_ext / k_f * (T_ext - T) (1)

and using under relaxation for values in boundary patch as it is described at http://www.cfd-online.com/Forums/ope...tml#post182101
This implicit boundary condition gives good agreement with FLUENT simulation, while mixed type BC just produces values at boundary close to T_ext.
__________________
Best regards,

Dr. Alexander VAKHRUSHEV

Christian Doppler Laboratory for "Metallurgical Applications of Magnetohydrodynamics"

Simulation and Modelling of Metallurgical Processes
Department of Metallurgy
University of Leoben

http://smmp.unileoben.ac.at
makaveli_lcf is offline   Reply With Quote

Old   April 14, 2009, 05:46
Default
  #19
tnk
New Member
 
L.E.Tonkov
Join Date: Apr 2009
Posts: 3
Rep Power: 17
tnk is on a distinguished road
Dear Foamers,
How can I implement "switching" b.c. on outlet channel boundary?
I need, for example, zeroGradient condition for pressure on supersonic part of outlet and fixedValue condition on rest outlet part (depend on calculated Mach number).
Need I construct new class for this type of b.c.?

Best regards
Leonid
tnk is offline   Reply With Quote

Old   April 14, 2009, 05:58
Default
  #20
Senior Member
 
Dr. Alexander Vakhrushev
Join Date: Mar 2009
Posts: 256
Blog Entries: 1
Rep Power: 19
makaveli_lcf is on a distinguished road
Send a message via ICQ to makaveli_lcf
Leonid,
look at boundary condition types in Programming guide, there is allready a set of switching boundary conditions based on velocity direction.
__________________
Best regards,

Dr. Alexander VAKHRUSHEV

Christian Doppler Laboratory for "Metallurgical Applications of Magnetohydrodynamics"

Simulation and Modelling of Metallurgical Processes
Department of Metallurgy
University of Leoben

http://smmp.unileoben.ac.at
makaveli_lcf is offline   Reply With Quote

Reply

Tags
heat transfer, new bc


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
Boundary condition for UDS Tomik FLUENT 0 December 5, 2006 18:37
Boundary condition of the third kind or Danckwertz boundary condition plage OpenFOAM Running, Solving & CFD 4 October 3, 2006 13:21
Slip Boundary Condition for Moving Boundary Shukla Main CFD Forum 3 November 11, 2005 16:02
UDF boundary condition Jeff FLUENT 2 November 20, 2003 18:15
Boundary Condition in LES Zhang Tsiang Main CFD Forum 3 February 5, 2002 21:15


All times are GMT -4. The time now is 16:06.