NB: The MatLab client will only communicate with OpenLab if you are using MatLab version 2016b or later.
You must also have a configuration created in the web browser client that you will run the drilling simulation on. For more info on this, check out our tutorials page and click the Configuration button.
Download and Installation
Once you have downloaded the client, simply unzip the contents and open the file
GetLoginData.m. This file is where you will put your authentication credentials as described in the following section.
Unlike our Python client, the MatLab client requires all 3 user identification parameters. These are as follows:
- API Key
- License ID
To generate these parameters:
1) Go to your
User settings in the top right corner of https://live.openlab.app.
2) Select which license you want to generate for (if multiple licenses)
Generate Matlab login script.
A new API key will be generated, and a form should appear which will overwrite your old API key (if you had one). Copy this key and paste it in the correct place for the upcoming options.
Once you have copied this script, paste it into the
GetLoginData.m that was opened in the earlier Download and Installation section.
Run Example Simulation
Open the case file
FlowSweep_BHPControl.m and enter the ConfigurationName for which you want to run the simulation on. Again, this must be an existing well configuration that you have created using the OpenLab web client.
Specify a new SimulationName or use the default given. This simulation name can be named anything (duplicates allowed) and will be visible in the browser when you start a simulation from MatLab.
Finally, run the case file
FlowSweep_BHPControl.m in MatLab. The simulation will now be visible in the browser under the Simulations tab. You can click the corresponding simulation and view the streamed results as they happen, but you will not be able to give any setpoint inputs.