Johns Hopkins Turbulence Databases

Using JHTDB with .NET


Overview

Microsoft Visual Studio 2005 and later will automatically generate interfaces to web services.

To add Web Reference, right click on a project in the Solution Explorer, choose "Add Service Reference...", and specify the URL http://turbulence.pha.jhu.edu/service/turbulence.asmx.

Example

C#
using edu.jhu.pha.turbulence
{
 Random random = new Random();
 var service = new TurbulenceServiceSoapClient();
 var points = new Point3[10];
 Vector3[] output;
 for (int i = 0; i < points.Length; i++) {
   points[i] = new Point3();
   points[i].x = (float)(random.NextDouble() * 2.0 * 3.14);
   points[i].y = (float)(random.NextDouble() * 2.0 * 3.14);
   points[i].z = (float)(random.NextDouble() * 2.0 * 3.14);
 }
 output = service.GetVelocity("jhu.edu.pha.turbulence.testing-200711", "isotropic1024fine", 0.0024f,  turbulence.SpatialInterpolation.Lag6, turbulence.TemporalInterpolation.None, points, null); // put null for the last parameter
 for (int r = 0; r < output.Length; r++) {
   Console.WriteLine("X={0} Y={1} Z={2}", output[r].x, output[r].y, output[r].z);
 }
}

Also in your App.config file in your project, you may want to increase the default size from 64k to something like 64M.
In order to do so, place the following in your App.config file:
<bindings>
   <basicHttpBinding>
   <binding name="TurbulenceServiceSoap"
    maxReceivedMessageSize="67108864" />
   </basicHttpBinding>
</bindings>

Disclaimer: While many efforts have been made to ensure that these data are accurate and reliable within the limits of the current state of the art, neither JHU nor any other party involved in creating, producing or delivering the website shall be liable for any damages arising out of users' access to, or uses of, the website or web services. Users use the website and web services at their own risk. JHU does not warrant that the functional aspects of the website will be uninterrupted or error free, and may make changes to the site without notice.

Last update: 12/2/2019 3:14:44 PM