This tutorial will guide you through the definition of the ConstantAtmosphere model.
function constantWindVelocity extends VehicleInterfaces.Atmospheres.Interfaces.Base.windVelocity; input Modelica.SIunits.Velocity[3] windVelocity; algorithm v := windVelocity; end constantWindVelocity;
function constantDensity "Determine density" extends VehicleInterfaces.Atmospheres.Interfaces.Base.density; input Modelica.SIunits.Density density "Density"; algorithm rho := density; end constantDensity;
function constantTemperature "Determine temperature" extends VehicleInterfaces.Atmospheres.Interfaces.Base.temperature; input Modelica.SIunits.Temperature T0 "Constant temperature"; algorithm T := T0; end constantTemperature;
function constantHumidity "Determine humidity" extends VehicleInterfaces.Atmospheres.Interfaces.Base.humidity; input Real h0 "Constant humidity"; algorithm h := h0; end constantTemperature;
model ConstantAtmosphere "Atmosphere with constant conditions" extends VehicleInterfaces.Atmospheres.Interfaces.Base( redeclare final function windVelocity = constantWindVelocity (windVelocity=v), redeclare final function density = constantDensity (density=rho), redeclare final function temperature = constantTemperature (T0=T), redeclare final function humidity = constantHumidity(h0=h)); //Rest of model definition ... end ConstantAtmosphere;