You could try the .NET library Proj.Net. See the Loading a projection by Spatial Reference ID page for how to add in the GB National Grid.
Example code from this forum post:
CoordinateSystemFactory c = new CoordinateSystemFactory();
ICoordinateSystem target = c.CreateFromWkt("PROJCS[\"OSGB 1936 / British National Grid\",GEOGCS[\"OSGB 1936\",DATUM[\"OSGB_1936\",SPHEROID[\"Airy 1830\",6377563.396,299.3249646,AUTHORITY[\"EPSG\",\"7001\"]],AUTHORITY[\"EPSG\",\"6277\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329251994328,AUTHORITY[\"EPSG\",\"9122\"]],AUTHORITY[\"EPSG\",\"4277\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitude_of_origin\",49],PARAMETER[\"central_meridian\",-2],PARAMETER[\"scale_factor\",0.9996012717],PARAMETER[\"false_easting\",400000],PARAMETER[\"false_northing\",-100000],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AUTHORITY[\"EPSG\",\"27700\"]]");
ICoordinateSystem source = c.CreateFromWkt("GEOGCS[\"GCS_WGS_1984\",DATUM[\"D_WGS_1984\",SPHEROID[\"WGS_1984\",6378137,298.257223563]],PRIMEM[\"Greenwich\",0],UNIT[\"Degree\",0.0174532925199433]]");
CoordinateTransformationFactory trf = new CoordinateTransformationFactory();
ICoordinateTransformation tr = trf.CreateFromCoordinateSystems(source, target);
double[] point = new double[] {-4.0, 55.6};
double[] result = tr.MathTransform.Transform(point);
Console.WriteLine(result);
Alternatively the Ordnance Survey have a downloadable tool if you register at http://gps.ordnancesurvey.co.uk/convert.asp
If your starting datum is OSGB 1936 (EPSG:27700) I don't think you'll be able to use Proj.Net for your conversion. Looking at other people's code on the Discussions page, it looks like Proj.Net is just applying a simple datum shift based on the "TOWGS84" parameter. This parameter is set in the Well Known Text (WKT) of your starting datum. A "TOWGS84" parameter will exist in the WKT only if you can do a simple transformation from your starting datum to WGS84.
Getting from OSGB1936 -> WGS84 is a two-step process where you have to convert OSGB1936 to ETRS89, then from ETRS89 to WGS84. (see EPSG:1681)
You would think you should be able to take the British National Grid, manipulate the XYs by some value, and get the Web Mercator XYs, but the math just isn't that simple.
Best Answer
The Esri software (actually Esri projection engine) doesn't have "WGS83(DD)" as a alias for our GCS_WGS_1984/WGS 1984/GCS WGS 1984 definition. Transformations include the full geographic coordinate reference systems of the source and target so they have to match.
One solution is to redefine coordinate reference system of the data that's using WGS84(DD) to the Esri definition.
Another solution would be to create a new transformation with the Create Custom Geographic Transformation tool (Data Management toolbox, Projections and Transformations toolset) that converts between WGS84(DD) and OSGB36. You would need the method and parameter values of the Petroleum transformation that you're using. You can find that information in the geographic_transformations.pdf file.
Note: If you define a custom transformation make sure the signs of the parameters match the direction of the transformation. That is, if you get the parameters from the pdf file and the transformation is defined as from OSGB36 to WGS84, the new transformation should also be defined as from OSGB36 to WGS84. If you switch the order (from WGS84 to OSGB36), you will need to change the signs of all parameters.