Spin up your personal cluster in minutes and boost your productivity 10x.
Before diving into tutorials and benchmarks, let's ensure that your Inductiva Python package is properly set up. To confirm everything is working as expected, simply run a quick OpenFAST simulation — it only takes a few seconds!
To get started, copy the code below and paste it into a Python script.
When you run the script, all the necessary simulation artifacts and configuration files will be automatically downloaded to your computer. The OpenFAST simulation will then be sent to a cloud machine for execution.
"""OpenFAST example."""
import inductiva
# Allocate cloud machine on Google Cloud Platform
cloud_machine = inductiva.resources.MachineGroup( \
provider="GCP",
machine_type="c2d-highcpu-2",
spot=True)
# Download the input files into a folder
input_dir = inductiva.utils.download_from_url(
"https://storage.googleapis.com/inductiva-api-demo-files/"
"openfastv4.0.2-input-example.zip",
unzip=True)
# List of commands to run
commands = ["openfast 5MW_OC4Semi_WSt_WavesWN/"
"5MW_OC4Semi_WSt_WavesWN.fst"]
# Initialize the Simulator
openfast = inductiva.simulators.OpenFAST( \
version="4.0.2")
# Run simulation
task = openfast.run( \
input_dir=input_dir,
commands=commands,
on=cloud_machine)
# Wait for the simulation to finish and download the results
task.wait()
cloud_machine.terminate()
task.download_outputs()
task.print_summary()
After the simulation completes, a task summary will be displayed in your terminal. If the task status shows Success, congratulations! You've successfully run an OpenFAST simulation.
You're ready to start running simulations seamlessly!
If you encounter any issues or need further assistance, don't hesitate to Contact Us. We're here to help!