Jump to content

Speed electric generator?


Recommended Posts

Ok, im developing a small mod that will add 3 parts, an engine, a capsule and an atmospheric generator that when speed starts to get higher, the propeller will start to rotate and should generate a bit of electricity, kinda like the one from the ME-163.

But, before i get into modelling that and everything, i want to know, what i've just said, its possible to make for KSP? Im talking about the "higher speed+lower in the atmosphere = higher electricity generation" thing. If someone knows how to manage this tell me please.

BTW, just managed to get my first WORKING part thanks to you guys, thanks, you're awesome :D! (Its the engine i was talking about)

Link to comment
Share on other sites

you can try an engine module with very low thrust (0.0001) and high alternator output; set it's velocity curve to run from speed X to Y (non zero, so it doesn't work when not moving); and set it to consume very small electric charge and some intake air (0.01 EC vs 10 IntakeAir). and you have a wind turbine

Link to comment
Share on other sites

I'll try that out, but to make it spin i need FireSpitter right?

if you want the spinny blades sure, FS Propeller spinner will let you spin the blades based on speed, which is nice. a simple tube would work just as well. make sure you have an extra transform for ModuleResourceIntake.

Link to comment
Share on other sites

How should i put the velocityCurve? I understand what you told me to do, but im not sure how im supposed to read this:

velocityCurve

{

key = 1000 0 0 0

key = 850 0.2 0 0

key = 0 1 0 0

}

I copied it from the Basic Jet Engine BTW.

I also need that to "balance" the rocket-plane engine i made, it uses oxidizer and its quite efficient with high thrust, i want to make it have 0 thrust at about 15km or so, so you can't abuse it to make easy SSTOs...

Edited by SlimeCrusher
Link to comment
Share on other sites

first number is the velocity; 2nd number is % of thrust at that velocity; last two numbers are the in/out tangents, check Taverius' KSP Float Curve thread for explanation. the two ends of the curves are clamped, meaning it will stay flat line based on the previous key. All KSP's input curves work the same way, that includes Velocity Curve (Thrust based on Velocity); Atmospheric Curve (ISP based on Altitude); also Steering curves in ModuleSteer and ModuleWheel, and all the settings in EFFECTS{} for particles and audio.

basically, you set the thrust to the velocity range you want the engine to produce thrust. so for a simple curve you set the engine produces 1 (100%) thrust at start (0 m/s); and 0 (0%) thrust at top speed 500m/s. the thurst engine produces will gradually decrease as you fly faster until you approach 500m/s and the engine produces 0 thrust. in game you would never reach 500m/s due to atmospheric drag.

so you can set an engine to only produce thrust from say 50m/s to 500m/s by setting 0~49m/s to produce 0 thrust; and 501m/s (all velocity higher than 500m/s) to produce 0 thrust.

another example using the wind turbine generator, you set the velocity curve to 0 0 0 0; 50 1 0 0. this way the turbine will reach max thrust (which you set very low in the ModuleEngine, or block it with a collider in unity.). ModuleAlternator will generate ElectricCharge when the engine is running above 0 thrust. Adding IntakeAir as propellant, and set checkOxygen to false, will make sure it only generates charge in an atmosphere (Jool; Laythe; Kerbin; or Duna)

there's no way to set thrust based on altitude. you can either add IntakeAir as another propellant, or set the ISP to a very low value at a maximum altitude, so it will run through the fuel very quickly

Edited by nli2work
Link to comment
Share on other sites

All i need is to make a craft with the engine uncapable of SSTOing with just the engine, a fuel tank and a capsule, setting the max speed to 500 or 600 m/s seems ok i believe.

Thanks for the help!

Edit: Didn't notice i had to add "useVelocityCurve = true" to the code, i was about to complain that it didn't work :P

Edit2: Any tutorials about using FireSpitter out there? I added the module "FSplanePropellerSpinner", pretty much copy-pasted from one of the engines from FS and changed the "propellerName", but it doesn't spin or anything. If i right-click i DO get airspeed though. (AFAIK it only appears on FS propellers, right?...)

I believe its because i don't have a separate propeller object, its all a single object...

Edited by SlimeCrusher
Link to comment
Share on other sites

HI I use the Fs prop spinner for all kinds of things, see the KerbalFoundries APU for instance which uses fs to spin the turbine , You will at least need a separate rotating object aligned Z up , theres no need to worry about the blades just the hub with blades as part rather than a sep object will do fine

And something like this in the cfg will work fine, the rpm has been experimented with since FS first arrived so I reckon it'll work fine for your purpose


MODULE
{
name = FSplanePropellerSpinner // the module
propellerName = AltFan //the part that spins
rotationSpeed = 250 //the rotation speed of the rotating part, can be set to negative for counter clockwise rotations
windmillRPM = 1 // the no power freewheel effect for when shut down but before rotation stops on its own
spinUpTime = 2.0 // the time taken for the rotating part to reach set RPM


}

PS check the FS thread for the FS documents which are some of the best documented modules around

Link to comment
Share on other sites

Thanks for the help buuuuuuut... It still doesn't spin...

I'll just forget about the generator for now, i'll remodel it and all, but first i'll start making the capsule, when i finish modelling, texturing and coding it, THEN i'll figure out how i can get the generator spinning.

Thanks, again :D.

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...