UNPKG

solvx_reservoir_tools

Version:

Client library for SolvxAI Reservoir Engineering Tools - Property of Nexa Consulting Services

33 lines (29 loc) 1.24 kB
const { SolvxaiPvtClient } = require('./dist/index'); async function main() { // Initialize the client with your API credentials const client = new SolvxaiPvtClient({ baseUrl: 'https://solvxai-pvt-services.vercel.app', // Replace with your actual API URL apiKey: 'solvxai_pvt_prop_service_x7F9q2Z5bVcT8sD3hL6pK4mR1nJ0wY3a' // Replace with your actual API key }); try { // Example parameters for PVT calculation const params = { reservoir_temperature: 200, // °F reservoir_pressure: 3000, // psia api_gravity: 35, // API gravity gas_specific_gravity: 0.7, // Gas specific gravity gas_oil_ratio: 500, // scf/STB bubble_point_pressure: 2000, // psia h2s_content: 0.01, // mole fraction co2_content: 0.02, // mole fraction n2_content: 0.01, // mole fraction water_salinity: 50000 // ppm }; // Calculate PVT properties const result = await client.calculatePvtProperties(params); console.log('PVT Properties:', result); } catch (error) { console.error('Error:', error.message); } } main();