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>
Last update: 12/2/2019 3:14:44 PM