
[Sponsors] 
January 5, 2011, 08:53 
Pulsatile Womersley velocity profile

#1 
Member
Join Date: Apr 2010
Posts: 53
Rep Power: 8 
Hello everybody,
as the topic says I would like to set up a pulsatile womersley velocity profile for my inlet BC! of course first of all I searched and read a lot about possibilities but I just found something about  OscillatingFixedValue  timeVaryingUniform  Contrib_groovyBC The Womersley velocity profile is changing in time and space I would say, so what will be a possibility to set it for my inlet? Is it possible with groovyBC from Bernhard and if yes, how and where can I put this complicated formula for the velocity? thank you so much! 

April 3, 2011, 22:53 

#2 
New Member
Abhro
Join Date: Jun 2010
Posts: 5
Rep Power: 8 
Hi,
Were you able to set womersley velocity profile as inlet for your problem? 

April 4, 2011, 11:33 

#4 
New Member
Abhro
Join Date: Jun 2010
Posts: 5
Rep Power: 8 
Hi
Could you tell me how did you implement it using groovyBC? Even i need to get a womersley profile for my inlet condition.. Thanks ! 

April 4, 2011, 12:41 

#5 
Member
Join Date: Apr 2010
Posts: 53
Rep Power: 8 
You have to compile the bc as described and add the libsline in the controlDict. Afterwards you are able to use the womerleyequation. But be aware of the fact that sinh and cosh are not known in groovyBC. but you can easiy convert them with the exp()function!


April 5, 2011, 18:07 

#6 
New Member
Abhro
Join Date: Jun 2010
Posts: 5
Rep Power: 8 
Thanks for your help philip! i`ll try out what you suggested.


April 5, 2011, 18:57 

#7 
New Member
Abhro
Join Date: Jun 2010
Posts: 5
Rep Power: 8 
Hi Philip,
Can you tell me the extact expression you entered in the variables part of the groovyBC inlet condition? I am not very sure about what to do with the Bessel function that comes into the inlet profile .. Thanks a lot for your time. 

April 6, 2011, 02:22 

#8 
Member
Join Date: Apr 2010
Posts: 53
Rep Power: 8 
Good morning!
I have no access to the files right now but I used the real part of the complex function which is: As I said just take care of the sinh and cosh! I hope that helps! Greets! 

April 6, 2011, 04:41 

#9 
Assistant Moderator
Bernhard Gschaider
Join Date: Mar 2009
Posts: 3,986
Rep Power: 41 
I just checked in the current version of swak4Foam and sinh etc are there. Not sure since when and not sure whether it is also there in the last version of "pure" groovyBC (probably the Wikipage never got updated)


July 20, 2011, 11:09 
Womersley profile  oscillatory pipe flow  complex bessel

#10 
New Member
Daniel
Join Date: Nov 2009
Posts: 10
Rep Power: 9 
Hi there,
I also want to use the Womersley profile as a Dirichlet velocity BC and decided to implement my own BC starting from parabolicVelocity and oscillating fixedValue... Since I need the Womersley profile for a pipe (3d) and not for a channel (2d), I have to deal with the complex Bessel function J0(z) instead of cosh. Therefore, I started to implement the functions j0(z), exp(z), pow(z,n), sqrt(z,n) etc for complex numbers (z), which are, as far as I know, not implemented in OF yet, right? My C++ is very poor, so I have some questions and could use some help here. 1.) Is src/OpenFOAM/primitives/complex/complexI.H the right place to implement these functions like this? . . . #include <complex> . . . // *************** Friend Functions ************** // inline complex exp(const complex& c) { std::complex<double> z(c.re, c.im); z = std::exp(z); return complex(z.real(), z.imag()); } . . . 3.) Or is there a better way / place to do that? 4.) Where should I implement such a function like factorial(Foam::scalar), which is also needed to evaluate complex J0? In src/OpeanFOAM/primiteves/Scalar/Scalar.H or is there a better place to do that? 5.) How do implement the Bessel function not only for a single scalar but for a scalarField, because I need this for the BC. I couldn't find an example how this is done for other functions, to start with. 6.) How do I implement the BC that it will work in parallel with maybe one or more processor boundaries on the patch? Is there somthing special to consider? Thanks for any comments and suggestions Cheers Daniel 

July 20, 2011, 12:38 

#11 
Member
Join Date: Apr 2010
Posts: 53
Rep Power: 8 
hi daniel,
its great that you want to implement the complete womersley profile in 3D! i would like to improve my BC as well but i am in cambodia on vacation until the 1st of august and the internet is pretty slow! but in the first week of august i am back at work. it would be nice if we can make some progress with the BC in openfoam! best regards! philipp 

July 20, 2011, 17:58 

#12  
Assistant Moderator
Bernhard Gschaider
Join Date: Mar 2009
Posts: 3,986
Rep Power: 41 
Quote:
If you manage to get your formula to pure real functions (you'll need one in the end anyway) you might as well use groovyBC again (Bessel functions are there under the names besselJ0 etc) 

July 21, 2011, 10:35 

#13  
New Member
Daniel
Join Date: Nov 2009
Posts: 10
Rep Power: 9 
Hej and thanks for replying!
Quote:
Quote:
I don't know if this is possible. I might be wrong but the formular reads somthing like u(r,t) = exp(z*t) * (1  J0(z*r) / J0(z) ) with z = complex number, so one have to take u.Re() as physically relevant part in the very end...!?! However, I allready implemented all the necessary formulas in CCode (or lets better say I copypasted all the stuff from elsewhere, just put it together in the right order and slightly modified it ). It works fine, it's veryfied and I get nice oscillating Womersley profiles... Furthermore, I allready implemented all the functions for complex scalars in OF, that works fine too. (see question 1, 3, 4) But now I have problems to make all the operators and functions work also for "complexScalarFields". How do I do that? (see question 5, 6 ) Cheers Daniel 

August 2, 2011, 07:51 

#14  
Member
Guifan Li
Join Date: Apr 2011
Location: New York City, U.S.
Posts: 96
Rep Power: 7 
Quote:
I am very interested your post about the expression of Womersley. But I can not open the photo you post. Can you please let me know how you implement the Womersley expression? Thanks a lot. 

August 3, 2011, 00:12 

#15  
Member
Guifan Li
Join Date: Apr 2011
Location: New York City, U.S.
Posts: 96
Rep Power: 7 
Quote:
Did you successfully implement the Womersley pulsatile inlet flow using u(r,t) = exp(z*t) * (1  J0(z*r) / J0(z) ) where z is complex number? I am working on the same thing as well. Where is the A/z*rho*w term gone? Very interested! 

August 10, 2011, 03:42 

#16  
Member
Join Date: Apr 2010
Posts: 53
Rep Power: 8 
Quote:
For this I used groovyBC from Bernhard (thanks again!) which worked quite well. First I tested with a standard parabolic velocity profile and then changed to the formula above. greets! 

August 10, 2011, 04:11 

#17  
Member
Guifan Li
Join Date: Apr 2011
Location: New York City, U.S.
Posts: 96
Rep Power: 7 
Quote:
But how do you decide the value of A. eg, How do you find the mean velocity of the flow? or I know the mean velocity at different t, how can I find A in this formula? Any ideas? Thanks a lot! 

August 10, 2011, 05:00 

#18 
Member
Join Date: Apr 2010
Posts: 53
Rep Power: 8 
This depends on the amplitude and mean velocity you like to have. I don't know for what you are needing this profile. In my case it was a model of the basilar arterie in the Circle of Willis so I got the values from literature....


August 11, 2011, 03:40 

#19  
Member
Guifan Li
Join Date: Apr 2011
Location: New York City, U.S.
Posts: 96
Rep Power: 7 
Quote:
Thanks for showing the formula. I may not explain it properly in last post. Sorry for that. Here is a mean velocity vs time figure from a journal paper. We can see the mean velocity profile is asymmetric across 1s. They use womersley inlet condition with womersley number 7, they give the property of the blood and geometry of the artery. So I can easily find the frequency w. Then substitute w( which is n in your formula ). I got a parabolic velocity profile pulse with time. But the velocity profile seem to be symmetrical, which like a sin function across 1s ( time period ). You may notice that in your simulation. If so, please let me know how would you make an asymmetric velocity profile and find the A in your formula? I appreciate! 

August 22, 2011, 05:51 
Womersley profile  oscillatory pipe flow  complex fields

#20 
New Member
Daniel
Join Date: Nov 2009
Posts: 10
Rep Power: 9 
Hi,
I was very busy with other stuff the last weeks, but now I try to finish my Womersley profile BC... Can someone tell me how and where to overload the operators for complexFields? For example, my problem is: Why does this work? scalarField stf1 = scalarField(7); scalarField stf2 = 5 + stf1 ; But this does not? complex c = complex( 3, 9 ) ; complexField ctf1 = ReComplexField( 7 ) ; complexField ctf2 = c + ctf1 ; error: no match for ‘operator+’ in ‘c + ctf2’ ... Thanks for any helpful hints Daniel 

Thread Tools  
Display Modes  


Similar Threads  
Thread  Thread Starter  Forum  Replies  Last Post 
UDF error  parabolic velocity profile  3D turbine  Zaqie  Fluent UDF and Scheme Programming  9  June 25, 2016 19:08 
Scale discrete inlet velocity profile with groovyBC  cboss  OpenFOAM  1  June 20, 2010 13:02 
FSI Pipe uniform velocity profile inlet  Absy  Main CFD Forum  0  April 6, 2010 03:01 
Velocity Profile  Jeff  FLUENT  1  November 24, 2008 09:21 
problem with velocity inlet profile file  Duncan  FLUENT  3  November 21, 2005 08:28 