5.1.1.2. gemini_model.corrosion.co2_corrosion

CO2 corrosion meta-model.

This module provides the high-level CO2Corrosion model that uses different CO2 corrosion correlations. Based on the selected corrosion_model parameter, it delegates the actual corrosion-rate calculation to one of the following implementations in gemini_model.corrosion.correlation:

  • DLD: de Waard–Lotz–Dugstad (1995)

  • DLM: de Waard–Lotz–Milliams (1991)

  • NORSOK: NORSOK M-506

The interface follows the common Model protocol used across Gemini. Provide inputs u and optional state x, and set parameters including corrosion_model and any model-specific parameters (e.g. diameter, roughness).

Classes

CO2Corrosion()

CO2 corrosion rate model (dispatcher).

class gemini_model.corrosion.co2_corrosion.CO2Corrosion[source]

Bases: Model

CO2 corrosion rate model (dispatcher).

Selects and runs one of the supported CO2 corrosion correlations (DLD, DLM, NORSOK) based on parameters['corrosion_model'] and returns the computed corrosion rate.

Initialize CO2 corrosion model.

calculate_corrosion_rate(u, x)[source]

Calculate the corrosion rate.

calculate_output(u, x)[source]

Calculate output based on input u and state x.

get_output()[source]

Get output of the model.

initialize_state(x)[source]

Generate an initial state based on user parameters.

update_parameters(parameters)[source]

Update model parameters.

Parameters:

parameters (dict) – Parameters dict as defined by the model.

update_state(u, x)[source]

Update the state based on input u and state x.