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

Modified Bessel Functions

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes
  • 1 Post By saumavadey

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   September 12, 2020, 13:53
Default Modified Bessel Functions
  #1
New Member
 
Saumava Dey
Join Date: Sep 2020
Posts: 29
Rep Power: 6
saumavadey is on a distinguished road
Are the modified Bessel Functions of Type 1 and Type 2 ie. I0, I1 and K0, K1 are available inside OpenFOAM's latest version (OpenFOAM v2006)?
saumavadey is offline   Reply With Quote

Old   September 12, 2020, 15:54
Default
  #2
Senior Member
 
Domenico Lahaye
Join Date: Dec 2013
Posts: 802
Blog Entries: 1
Rep Power: 19
dlahaye is on a distinguished road
OpenFoam has boost (see boost.org) and boost in turn has modified Bessel fcts.
dlahaye is offline   Reply With Quote

Old   September 12, 2020, 16:19
Default
  #3
New Member
 
Saumava Dey
Join Date: Sep 2020
Posts: 29
Rep Power: 6
saumavadey is on a distinguished road
Hello dlahaye!

Thank you very much for your answer.

As I am a beginner in OpenFOAM programming, can you please guide me through the steps to call any function from 'BOOST' to my code in OpenFOAM.

Do I need to install the latest version of BOOST in the same directory where I have OpenFOAM installed on my laptop?
saumavadey is offline   Reply With Quote

Old   September 12, 2020, 16:23
Default
  #4
Senior Member
 
Domenico Lahaye
Join Date: Dec 2013
Posts: 802
Blog Entries: 1
Rep Power: 19
dlahaye is on a distinguished road
See examples on boost.org Good luck.
dlahaye is offline   Reply With Quote

Old   September 18, 2020, 16:14
Default
  #5
New Member
 
Saumava Dey
Join Date: Sep 2020
Posts: 29
Rep Power: 6
saumavadey is on a distinguished road
Hello Foamers!

I have stated using the Modified Bessel Function from boost in my code as follows:

scalar T = this->db().time().value();
scalar P = i*log(2.0)/T;
scalar Q0 = sqrt(P);
scalar K0_0 = cyl_bessel_k(0, Q0);

While compiling it gives the following error:

error: ‘cyl_bessel_k’ was not declared in this scope scalar K0_0 = cyl_bessel_k(0, Q0);

note: suggested alternative: In file included from myFunctionFvPatchScalarField.C:18:0: /usr/include/boost/math/special_functions/bessel.hpp:587:81: note: ‘boost::math::cyl_bessel_k’
inline typename detail::bessel_traits<T1, T2, policies :: policy<> >::result_type cyl_bessel_k(T1 v, T2 x)

I am not being able to figure out the problem. I seek help in this regard.
saumavadey is offline   Reply With Quote

Old   September 28, 2020, 20:00
Default Bessel function for non-integer orders
  #6
New Member
 
Esmaeel Eftekharian
Join Date: Jan 2016
Location: Sydney, Australia
Posts: 16
Rep Power: 10
Esmaeelef is on a distinguished road
Hello everyone,

I have seen that OpenFOAM provides bessel functions of orders 0 and 1, but, I need to use a Bessel function of non-integer order in my code. Does OpenFOAM have a function in this regard?
Esmaeelef is offline   Reply With Quote

Old   September 29, 2020, 03:50
Default
  #7
New Member
 
Saumava Dey
Join Date: Sep 2020
Posts: 29
Rep Power: 6
saumavadey is on a distinguished road
I have seen examples of Bessel function evaluation of non-integer orders using the Boost library functions. You can try using them.
Esmaeelef likes this.
saumavadey is offline   Reply With Quote

Reply

Tags
function


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
[General] Extracting ParaView Data into Python Arrays Jeffzda ParaView 30 November 6, 2023 22:00
Problem while compiling modified simpleFoam solver mattiafc OpenFOAM Programming & Development 0 May 26, 2020 21:01
[Commercial meshers] CCM+ Mesh Conversion Ingenieur OpenFOAM Meshing & Mesh Conversion 17 February 2, 2014 10:34
Working with Bessel functions? farhan CFX 0 March 25, 2009 17:42
Modified wall functions Stephanie Main CFD Forum 0 May 14, 2007 04:15


All times are GMT -4. The time now is 19:24.