Valves

Top  Previous  Next

The Valve object provides the capability to model Thrusters that connect to multiple Tanks. The tanks could be bi-propellant, redundant supplies, or both.

 

This page is divided into four sections:

1.Mixture Ratio

2.Consistency

3.Valve Indexing through Script

4.Creating and Editing Valves via Object Editor

 

 

Mixture Ratio


When multiple tanks feed a thruster, then the computed mass flow will be shared across the tanks according to their mixture ratio, as specified in each tank’s MassMixPartsPer property. The MassMixPartsPer for each Tank is given as parts per total parts. If only one tank is used with a given thruster at a time, then this property should be set to 1. The ratio of mass depletion is dependent only on the MassMixPartsPer property and is independent of the TankPressure of each tank.

 

For an example with 2 tanks:

If        Spacecraft1.Tanks[0].MassMixPartsPer = 1;

and      Spacecraft1.Tanks[1].MassMixPartsPer = 1;

then each tank mass is depleted equally because the ratio is 1/2 for each tank.

 

If        Spacecraft1.Tanks[0].MassMixPartsPer = 1;

and      Spacecraft1.Tanks[1].MassMixPartsPer = 2;

then the mass depletion of Tank 1 will be 1/3 of the total and the mass depletion of Tank 2 will be 2/3 of the total.

 

 

Consistency


Modeling of Thrust and Isp is performed using weighted averages of the temperatures, pressures, and reference temperatures from the attached and active Tanks associated with each Thruster. A consistency check can be performed across all active tanks by setting the Thruster.TestTankConsistency flag to 1. If set to 1 (default), then the maximum deviations in tank temperature and pressure are defined through the thruster properties MaxTempDiff and MaxPressureDiff. If the deviation exceeds these values, an error is generated.

 

Also, to aid in the maintenance of consistent temperatures and pressures, the property Thruster.ForceTankConsistency is available. This property allows you to equalize the pressure and/or temperature of all attached Tanks after every burn, computed as a weighted average based on their mixture ratios.

 

Thruster2.TestTankConsistency = 1;   // 1 is the default value

Thruster2.MaxPressureDiff = 0.1;     // kPa

Thruster2.MaxTempDiff = 0.01;       // C

 

Thruster2.ForceTankConsistency = 1; // equalize Temperature and Pressure

 

 

Valve Indexing


To control the flow of fuel from multiple tanks, specify a Valve number when attaching Tanks to Thrusters. Valve indexing starts at 0. The Thruster.AddTankToValve() method can also be used in place of the Attach command.

 

Example: Attach Two Tanks to a Thruster

 

In this example, the Interpolated tank, attached via Valve 0, is cut off when the Spacecraft semi-major axis exceeds 7100 km.

 

SphericalTank SphericalTank1;

InterpolatedTank InterpolatedTank1;

Thruster Thruster1;

 

Attach SphericalTank1 to Spacecraft1;

Attach InterpolatedTank1 to Spacecraft1;

Attach Thruster1 to Spacecraft1;

 

Thruster1.AddTankToValve(0,InterpolatedTank1);

Thruster1.AddTankToValve(1,SphericalTank1);

 

Thruster1.TestTankConsistency = 0;

Thruster1.ForceTankConsistency = 0;

 

While (Spacecraft1.ElapsedTime < TIMESPAN(1 hours));

 

      If (Spacecraft1.A > 7100);

            Thruster1.Valves[0].State = 0;

      Else;

            Thruster1.Valves[0].State = 1;

      End;

 

      Report Spacecraft1.A, SphericalTank1.TankPressure, InterpolatedTank1.TankPressure;

      Maneuver Spacecraft1 using FiniteBurn1;

      View Spacecraft1;

 

End;

 

Output Report Excerpt:

 

Spacecraft.A

7098.877375170

7099.322621763

7099.780307152

7100.252616140

7100.741679893

7101.249567375

7101.778276943

7102.329728231

SphericalTank Pressure

1327.612946755

1320.386990487

1313.239267546

1306.168514258

1292.252996576

1278.630856629

1265.292913375

1252.230364898

 InterpolatedTank Pressure

   1483.942826877

   1483.186770155

   1482.431483451

  1481.676965587 // Valve 0 is cut off; Pressure stops changing

   1481.676965587

   1481.676965587

   1481.676965587

   1481.676965587

 

See the Valve Properties and Methods page for more information.

 

 

Creating and Editing Valves via Object Editor


1.To add Valves to a Spacecraft object, open the Spacecraft object and select the Thrusters page under Subsystems.

2.Select the Valves page (available for Chemical Thrusters only).

3.Use the Create button to add Valves.

4.Specify the Valve State (Open or Closed) and choose Tanks to connect to the Thruster through this Valve.

 

Creating and Editing a Valve

Creating and Editing a Valve

 

 

See Also


Valve Properties and Methods

Attach Command