
[Sponsors] 
November 30, 2005, 16:07 
I need to implement Johnson an

#1 
Senior Member
Alberto Passalacqua
Join Date: Mar 2009
Location: Ames, Iowa, United States
Posts: 1,910
Rep Power: 27 
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. OpenQBMM  An opensource implementation of quadraturebased moment methods. To obtain more accurate answers, please specify the version of OpenFOAM you are using. 

December 1, 2005, 04:04 
Hi,
We had a similar bc in

#2 
Super Moderator
Niklas Nordin
Join Date: Mar 2009
Location: Stockholm, Sweden
Posts: 693
Rep Power: 21 
Hi,
We had a similar bc in our version of the twophase 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 

December 1, 2005, 05:38 
Hello,
yes, I know these boun

#3 
Senior Member
Alberto Passalacqua
Join Date: Mar 2009
Location: Ames, Iowa, United States
Posts: 1,910
Rep Power: 27 
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. OpenQBMM  An opensource implementation of quadraturebased moment methods. To obtain more accurate answers, please specify the version of OpenFOAM you are using. 

December 1, 2005, 07:28 
OK, with the help of Rasmus I

#4 
Super Moderator
Niklas Nordin
Join Date: Mar 2009
Location: Stockholm, Sweden
Posts: 693
Rep Power: 21 
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 noslip (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 

December 1, 2005, 08:39 
Thank you and Rasmus. I'll add

#5 
Senior Member
Alberto Passalacqua
Join Date: Mar 2009
Location: Ames, Iowa, United States
Posts: 1,910
Rep Power: 27 
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. OpenQBMM  An opensource implementation of quadraturebased moment methods. To obtain more accurate answers, please specify the version of OpenFOAM you are using. 

December 2, 2005, 10:52 
Hello,
if you consider the pa

#6 
Senior Member
Alberto Passalacqua
Join Date: Mar 2009
Location: Ames, Iowa, United States
Posts: 1,910
Rep Power: 27 
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/(1a) 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. OpenQBMM  An opensource implementation of quadraturebased moment methods. To obtain more accurate answers, please specify the version of OpenFOAM you are using. 

December 2, 2005, 11:45 
Hola,
Not 100 percent sure,

#7 
Super Moderator
Niklas Nordin
Join Date: Mar 2009
Location: Stockholm, Sweden
Posts: 693
Rep Power: 21 
Hola,
Not 100 percent sure, but I'd say its like this: valueFraction*U + (1valueFraction)*dU = 0 N 

December 2, 2005, 15:36 
Hello,
I'm a bit confused bec

#8 
Senior Member
Alberto Passalacqua
Join Date: Mar 2009
Location: Ames, Iowa, United States
Posts: 1,910
Rep Power: 27 
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 + (1valueFraction)*dU = 0 because, for valueFraction = 1, it gives the noslip b.c. and not the slip one. This is the reason I thought to something like: (1valueFraction)*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. OpenQBMM  An opensource implementation of quadraturebased moment methods. To obtain more accurate answers, please specify the version of OpenFOAM you are using. 

December 2, 2005, 23:10 
I tried to apply the condition

#9 
Senior Member
Alberto Passalacqua
Join Date: Mar 2009
Location: Ames, Iowa, United States
Posts: 1,910
Rep Power: 27 
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/OpenFOAM1.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. OpenQBMM  An opensource implementation of quadraturebased moment methods. To obtain more accurate answers, please specify the version of OpenFOAM you are using. 

December 3, 2005, 09:09 
Hi,
I might possibly have the

#10 
Super Moderator
Niklas Nordin
Join Date: Mar 2009
Location: Stockholm, Sweden
Posts: 693
Rep Power: 21 
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 rewritten 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 

December 3, 2005, 11:07 
The kineticTheoryProperties di

#11 
Senior Member
Alberto Passalacqua
Join Date: Mar 2009
Location: Ames, Iowa, United States
Posts: 1,910
Rep Power: 27 
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. OpenQBMM  An opensource implementation of quadraturebased moment methods. To obtain more accurate answers, please specify the version of OpenFOAM you are using. 

December 9, 2005, 03:56 
Hi,
Just tested the code an

#12 
Super Moderator
Niklas Nordin
Join Date: Mar 2009
Location: Stockholm, Sweden
Posts: 693
Rep Power: 21 
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 valuestatement, remember that if you want partial slip, you need a reference velocity. N 

December 10, 2005, 20:06 
You're right Niklas. I forgot

#13 
Senior Member
Alberto Passalacqua
Join Date: Mar 2009
Location: Ames, Iowa, United States
Posts: 1,910
Rep Power: 27 
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. OpenQBMM  An opensource implementation of quadraturebased moment methods. To obtain more accurate answers, please specify the version of OpenFOAM you are using. 

February 16, 2006, 13:23 
How does one obtain the tangen

#14 
New Member
Jeff Allen
Join Date: Mar 2009
Posts: 11
Rep Power: 9 
How does one obtain the tangent vector to a given face. I know for example that Sf() gives the normal vector.
Thanks Jeff 

February 16, 2006, 17:01 
1) Take any vector, a
2) get

#15 
Senior Member
Hrvoje Jasak
Join Date: Mar 2009
Location: London, England
Posts: 1,784
Rep Power: 22 
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
__________________
Hrvoje Jasak Providing commercial FOAM/OpenFOAM and CFD Consulting: http://wikki.co.uk 

March 26, 2009, 21:23 

#16 
New Member
Cynthia Poon
Join Date: Mar 2009
Posts: 4
Rep Power: 9 
Hi Niklas and everybody,
I've got some problem when postprocessing 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 postprocessing? I am sorry if my question is too silly. Regards, Cynthia 

April 9, 2009, 11:58 

#17 
Senior Member

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 heatsink 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 "Advanced Process Simulation of Solidification and Melting" Simulation and Modelling of Metallurgical Processes Department of Metallurgy University of Leoben FranzJosefStr. 18 A  8700 Leoben Österreich / Austria Tel.: +43 3842  402  3125 http://smmp.unileoben.ac.at 

April 14, 2009, 03:03 

#18 
Senior Member

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 Matrix coefficients from boundary conditions how 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 "Advanced Process Simulation of Solidification and Melting" Simulation and Modelling of Metallurgical Processes Department of Metallurgy University of Leoben FranzJosefStr. 18 A  8700 Leoben Österreich / Austria Tel.: +43 3842  402  3125 http://smmp.unileoben.ac.at 

April 14, 2009, 04:46 

#19 
New Member
L.E.Tonkov
Join Date: Apr 2009
Posts: 3
Rep Power: 9 
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 

April 14, 2009, 04:58 

#20 
Senior Member

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 "Advanced Process Simulation of Solidification and Melting" Simulation and Modelling of Metallurgical Processes Department of Metallurgy University of Leoben FranzJosefStr. 18 A  8700 Leoben Österreich / Austria Tel.: +43 3842  402  3125 http://smmp.unileoben.ac.at 

Tags 
heat transfer, new bc 
Thread Tools  
Display Modes  


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 12: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 