Jump to content

77 Industries: Hydraulics 0.11


Azimech

Recommended Posts

Hydraulics

Javascript is disabled. View full album

I'm want to develop a simple mod for the inclusion of hydraulic systems. I believe it's fun to have another touch of complexity so we can do some extra micromanagement and planning.

Hydraulic systems are everywhere in aeronautics.

They're used for/in:

engine gimbals

wheel brakes

nose wheel steering

landing gear retraction/extension

landing gear suspension

flaps and slats

thrust reversers

spoilers/speed brakes

flight control surfaces

cargo doors/loading ramps

windshield wipers

propeller pitch control

Unlike the brakes of your car, which is a closed low pressure system, hydraulics in airplanes are "open" in that the amount and pressure are varied according to demand, using variable high pressure pumps, for circulating the fluid during extended periods in space or applying pressure when needed.

The fluids and parts are being cooled or heated depending on ambient temperatures so the hydraulic fluid remains at it's optimum operating temperature (viscosity), and to prevent accelerated chemical breakdown during very long voyages. This all costs electricity.

The high pressure pumps are usually driven by electric motors, some may be driven by a jet engine or reciprocating engine. In airplanes and spacecraft it's usually done by the APU.

Large airplanes which lose electrical power during flight have a wind turbine which can be deployed from the fuselage for driving an alternator and hydraulic pump, to maintain control of the various systems. Hydraulic systems in airplanes and spacecraft are redundant in design, having a minimum of two identical circuits.

The main parts in hydraulic systems are:

reservoirs

high pressure pumps

accumulators

control valves/bleed valves/servo's

actuators/hydromotors/cylinders

pipes/hoses

Additional elements are

cooling/heating systems,

filters, both for solid and liquid contaminants

sensors

Hydraulic pumps:

Gear_pump_exploded.png

pumpinside.jpg

Accumulators:

6960d1133652289-how-much-xm-xantia-accumulator-xm-rearcentresphere.jpg

citroen_sphere.jpg

I don't plan on making a very complex mod, just some scripts, some models and use module manager, I hope someone can help me with writing a plugin, I can't code.

I do not plan to create a true hydraulics simulation with all the parts like valves, filters etc. That is far beyond my (current) abilities.

Example: a hydraulic pump driven by a jet engine:


MODULE
{
name = ModuleAlternator
RESOURCE
{
name = HydraulicPower
rate = 1
}

Resource:


RESOURCE_DEFINITION
{
name = HydraulicFluid
density = 0.005
flowMode = All_VESSEL
transfer = PUMP
isTweakable = true
}

RESOURCE_DEFINITION
{
name = HydraulicPower
density = 0.0001
flowMode = All_VESSEL
transfer = PUMP
isTweakable = false
}

Hydraulic all in one unit. Separate parts are an option.


PART
{
// Kerbal Space Program - Part Config

// --- general parameters ---
name = HydraulicAllinOne
module = Part
author = Azimech

// --- asset parameters ---
mesh = model.mu
scale = 1
rescaleFactor = 1

// --- node definitions ---
node_stack_top = 0.0, 0.2853027, 0.0, 0.0, 1.0, 0.0
node_stack_bottom = 0.0, -0.2853027, 0.0, 0.0, 1.0, 0.0

// --- editor parameters ---
TechRequired = BasicRocketry
entryCost = 2400
cost = 800
category = Utility
subcategory = 0
title = Hydraulic Unit
manufacturer = 77 Industries
description = Hydraulic Unit that includes a tank for hydraulic fluid, an accumulator for hydraulic pressure and a high pressure pump.

// attachment rules: stack, srfAttach, allowStack, allowSrfAttach, allowCollision
attachRules = 1,0,1,1,0

// --- standard part parameters ---
mass = 0.15
dragModelType = default
maximum_drag = 0.2
minimum_drag = 0.2
angularDrag = 2
crashTolerance = 5
maxTemp = 800

RESOURCE
{
name = HydraulicPower
amount = 0
maxAmount = 200
}

RESOURCE
{
name = HydraulicFluid
amount = 50
maxAmount = 50
}

MODULE
{
name = ModuleGenerator
isAlwaysActive = false
activateGUIName = Start Pump
shutdownGUIName = Stop Pump
INPUT_RESOURCE
{
name = ElectricCharge
rate = 5
}


INPUT_RESOURCE
{
name = HydraulicFluid
rate = 0.001
}


OUTPUT_RESOURCE
{
name = HydraulicPower
rate = 2
}
requiresALLInputs = true
}
}

Control surface. This doesn't work. I expect a plugin is needed. Same for landing gear, wheel steering, suspension ride height and engine gimbals.


MODULE
{
name = ModuleControlSurface
dragCoeff = 0.5
deflectionLiftCoeff = 0.7
ctrlSurfaceRange = 20
ctrlSurfaceArea = 0.95

RESOURCE
{
name = HydraulicPower
rate = 0.3
}
}

To do:

create proper conversion from electricity to hydraulic pressure - DONE

create custom models & textures

make parts work with hydraulic pressure

write scripts for module manager

create part that gives support for maintaining operating temperatures (read: a thing that consumes electricity for nothing)

create a timer that disables hydraulics if the system is not being maintained for a longer period, at abnormal temperatures (see above)

create a deployable wind turbine

Optional: include sounds for pumps, valves and actuators

You may download it, but you can't really do anything with it yet except starting pumps and see values go up and down).

DOWNLOAD: Hydraulics 0.11 alpha

https://www.dropbox.com/s/yk3im4rotbtbeml/Hydraulics_011.zip

This is my first attempt at producing a mod, so go easy on me ;-)

And any help is greatly appreciated :-)

Edited by Azimech
Link to comment
Share on other sites

So by look at some of what you have looks like over time your using HydraulicFluid like a fuel that right ? so it would be something that as to be refueled ?

EDIT And why you need the plugins but don't see them in your post now have a look at this and see if that's what you was looking for https://www.dropbox.com/s/9seef2aetnemfqq/HydraulicPump.zip

Small Converter that use's HydraulicFluid at a low rate and makes HydraulicPower and should use alittle power but my test had alot of power on it so couldn't see it drain.

Edited by Mecripp2
Link to comment
Share on other sites

Thanks, I'll take a look at it. A plugin is probably needed to get control surfaces and such to accept hydraulic pressure as a resource.

Hydraulic fluid as a fuel was an experiment, purely to get the kethane converter to do something.

Link to comment
Share on other sites

Tiny update to 0.11.

Removed kethane.dll, ModuleGenerator does the pumping now. Added a new part which houses a tank, accumulator and pump.

White Owl, indeed, but not that you'd need IR just for hydraulics. I've played around with IR in the past and in the end I hardly touched it.

Link to comment
Share on other sites

Any updates ? and what are you trying to do with

MODULE

{

name = ModuleControlSurface

dragCoeff = 0.5

deflectionLiftCoeff = 0.7

ctrlSurfaceRange = 20

ctrlSurfaceArea = 0.95

RESOURCE

{

name = HydraulicPower

rate = 0.3

}

}

? Edited by Mecripp2
Link to comment
Share on other sites

WOW!!! This is what I was waiting for!

Next difficulty stop: Heat management =)

Although, I think that the Shuttle cargo bay was actually inertial and not hydraulic, by which I mean, it's basically a spring mechanism that pushed the bay door, and then the door would continue going on it's own inertia until locked on the other side in "open" position. To open the bay doors on the ground there was a special rig/crane that attached from the outside. Someone please correct if I'm wrong. But I'd definitely keep cargo bays hydraulic in KSP cause they can also open on the ground under gravity.

Also, an interesting note is the the Shuttle's hydraulics (primarily for aileron control) were run by the apu that was powered with hydrazine (monopropellant) and not by the fuel cells. It would be cool to add an APU run by the monopropellant to generate power for some big movable surfaces.

Link to comment
Share on other sites

I haven't had much time but on and off I'm brainstorming about the logic behind it. I can't code (yet) but I'm good with logic and can design a principle. Also I'm willing to learn by reading (offered) example code and experimenting with variables along the way.

I've been looking for ways to manipulate the current part modules but the only way I can currently think of is by capturing user input and modifying or blocking it.

For example the control surfaces. The simplest way to do so and which is easy to grasp for the common user is to have a threshold value (say 100 atm, half of the usual hydraulic operating pressure) and below this, pulse width modulation is used to gradually reduce amplitude (max angle) of said control surfaces.

Another example are flaps. Flaps require pressure and flow. Flow is best illustrated using a car battery starting your engine. You have pressure (voltage) and flow (current in the form of ampère). You might have a lot of pressure with the flaps in initial position but large flaps require large hydraulic cylinders to compensate for the tremendous aerodynamic forces involved while flying. While starting your car, the usual 12 volts can drop to as low as 9 volts, because of the high power the starter motor needs. High current = high flow. So in hydraulics the pressure drops faster with each increasing angle of the flaps deploying than with normal control surfaces, if the accumulator is not being re-pressurized by the hydraulic pump.

In a hypothetical situation this would be the case for lowering landing gear. Fortunately lowering gear can be done without hydraulics in case of emergency. Pull the handle and the locks move out, then the gear drops and locks using gravity.

Raising gear is again a different story. This again requires pressure and flow. So in normal situations raising and lowering gear draws a lot of pressure and flow.

Then you have brakes. Usually brakes have an extra failsafe in aviation but for a gameplay point of view, let's say they don't. Again we could use pulse width modulation to decrease the effectiveness of the brakes.

Steering is the same. Due to the geometry of most vehicles more power is required to steer at a greater angle than the direction of your vehicle. This is essentially true for every car on the planet. With airplanes this might not be the case due to the fact you have a single steering point at the front. I won't go deeper into details right now since it's not important. But ... for gameplay once again it's interesting to limit the maximum steering angle AND the speed of changing direction below a threshold value.

I don't have the time to write more at this time. There's more to come. The subject of hydraulics is fascinating. I will place a topic in a different section of the forum to request help in programming the stuff.

Link to comment
Share on other sites

Try'ed to use the

MODULE

{

name = ModuleResourceIntake

resourceName = IntakeAir

checkForOxygen = true

area = 0.004

intakeSpeed = 10

intakeTransformName = Intake

}

RESOURCE

{

name = IntakeAir

amount = 0.5

maxAmount = 1.0

}

as a hydraulic pump but haven't got it to work same as making a MM file with a list of parts to use it but no luck. ;.;
Link to comment
Share on other sites

ModuleControlSurface and the others ... it seems they don't need any resource, that would be easy. AFAIK there are no "hooks" to modify their behaviour.

The alternative to capturing control input would be to write new part modules. I feel that's unnecessary and much too complex in most cases. It could be interesting with ModuleLandingGear, to halt animations half way or change the behaviour of the suspension. I guess there are many mods and SAS dependent on ModuleControlSurface that it would be foolish to hack one ourselves and not create an angry Frankenstein.

Link to comment
Share on other sites

This thread is quite old. Please consider starting a new thread rather than reviving this one.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...