Pennsy K4 Add-on

Discussion of rolling-stock creation & re-painting.

Pennsy K4 Add-on

Unread postby JohnS » Thu Jul 16, 2015 6:31 pm

Does anybody else notice that when you are operating this loco that your boiler pressure increases the more you pull out on the regulator? I thought it would decrease the steam pressure as you use it? If this is incorrect operation has anyone fixed this ?

*!!thnx!!* John
User avatar
JohnS
 
Posts: 1116
Joined: Sun Dec 29, 2013 6:48 am
Location: Portage IN

Re: Pennsy K4 Add-on

Unread postby DrewG » Thu Jul 16, 2015 8:34 pm

My saftey is always going off when I drive the K4. I think this one needs a physics update.
DrewG
 
Posts: 910
Joined: Wed Jan 22, 2014 7:00 pm
Location: Ontario, Canada

Re: Pennsy K4 Add-on

Unread postby JohnS » Mon Jul 20, 2015 7:31 am

Well I did some investigating. Keep in mind I know nothing about writing LUA but I understand what it's doing. With that said this is what I found:

function Setup ()

Call ( "Main Smoke Stack:SetEmitterRate", 100000 )
Call ( "Slip Smoke:SetEmitterRate", 10000 )

gEmitRate = 0.001

end


function Update (interval)

-- Control smoke based on regulator and wheelslip
if Call( "*:GetControlValue", "Regulator", 0 ) > 0 then
Call ( "Main Smoke Stack:SetEmitterRate", gEmitRate )
Call ( "Stack Smoke:SetEmitterRate", 100000 )

if Call( "*:GetControlValue", "Wheelslip", 0 ) > 1.5 then
Call ( "Slip Smoke:SetEmitterRate", gEmitRate )
else
Call ( "Slip Smoke:SetEmitterRate", 10000 )
end

else
Call ( "Main Smoke Stack:SetEmitterRate", 100000 )
Call ( "Stack Smoke:SetEmitterRate", 0.075 )
Call ( "Slip Smoke:SetEmitterRate", 100000 )
end

What is highlighted is what shuts the emitters "off". What is actually doing is setting the Emitter so high that is "building up" the particles to meet that rate then release. When we open the regulator what has built up so far get released as a big puff. Now I have tried many thing to shut this emitter off with the operation of the regulator but I can't find a way. It will keep "puffing" with the wheel rotation. I don't remember if the "puffing" effect is true to life when the regulator is shut off. If anybody can help with the LUA or knows the puffing effect with regulator of in real life please let me know this way I can move on to adding more effects.
Thank you
User avatar
JohnS
 
Posts: 1116
Joined: Sun Dec 29, 2013 6:48 am
Location: Portage IN

Re: Pennsy K4 Add-on

Unread postby _o_OOOO_oo-Kanawha » Mon Jul 20, 2015 9:46 am

Have you compared the simulation script with other steam locomotives? The older ones have their scripts still in lua.

With the regulator closed their should be hardly any chuffing exhaust, as there is no steam coming from the cylinders.
As there is no draft generated by the exhaust, a blower can be used, and that produces a steady "smoke".
Edwin "Kanawha"
Image
The Chessie, the train that never was ... (6000 hp Baldwin-Westinghouse steam turbine electric)
User avatar
_o_OOOO_oo-Kanawha
 
Posts: 3231
Joined: Mon Nov 14, 2011 2:12 pm

Re: Pennsy K4 Add-on

Unread postby JohnS » Tue Jul 21, 2015 11:10 am

So I have been doing a lot of trial and error. I have found this "command" Call ( "*:SetEmitterActive", 0 ). When I use it for other steam or smoke effects it shuts them off but If I have it like this:
Call ( "Main Smoke Stack:SetEmitterActive", 0 ) it still won't shut the smoke stack emitter off. I can't figure out what other element is also controlling this emitter. !*don-know!* **!!bang!!**
User avatar
JohnS
 
Posts: 1116
Joined: Sun Dec 29, 2013 6:48 am
Location: Portage IN

Re: Pennsy K4 Add-on

Unread postby TheOldDessauer » Mon Jul 27, 2015 3:33 pm

u
Last edited by TheOldDessauer on Mon Sep 26, 2016 11:38 am, edited 1 time in total.
TheOldDessauer
 
Posts: 264
Joined: Fri Oct 25, 2013 1:58 pm

Re: Pennsy K4 Add-on

Unread postby JohnS » Tue Jul 28, 2015 12:15 am

None. I can't get the smoke emitter to shut off. **!!bang!!**
User avatar
JohnS
 
Posts: 1116
Joined: Sun Dec 29, 2013 6:48 am
Location: Portage IN

Re: Pennsy K4 Add-on

Unread postby mrennie » Tue Jul 28, 2015 8:08 am

JohnS wrote:So I have been doing a lot of trial and error. I have found this "command" Call ( "*:SetEmitterActive", 0 ). When I use it for other steam or smoke effects it shuts them off but If I have it like this:
Call ( "Main Smoke Stack:SetEmitterActive", 0 ) it still won't shut the smoke stack emitter off. I can't figure out what other element is also controlling this emitter. !*don-know!* **!!bang!!**


"Main Smoke Stack" is a special name that is handled by the core code in a specific way to synchronise the emissions with the chuffs. To override it, you have to change the name of the emitter in the blueprint, and then control it from the script. However, that means that the script has to control the chuffing, which in turn means that the script has to take over the physics of the rotation of the driving wheels, which is what I did in the Connie (update) and FEF-3. It's also the only way to have two "chuffing" smoke emitters for a double-stack. Furthermore, it's the only way to avoid the puff ball.
User avatar
mrennie
 
Posts: 3214
Joined: Wed May 30, 2012 12:22 pm

Re: Pennsy K4 Add-on

Unread postby JohnS » Tue Jul 28, 2015 8:49 am

Ok mrennie I'm following so far. Now would I need to reference the physics to be called in the Lua so the smoke will chuff with the wheel rotation or is this physics that I would have to completely write in Lua? If you would rather help me in PM's I can do that too. Thank you very much
User avatar
JohnS
 
Posts: 1116
Joined: Sun Dec 29, 2013 6:48 am
Location: Portage IN

Re: Pennsy K4 Add-on

Unread postby mrennie » Tue Jul 28, 2015 9:34 am

JohnS wrote:Ok mrennie I'm following so far. Now would I need to reference the physics to be called in the Lua so the smoke will chuff with the wheel rotation or is this physics that I would have to completely write in Lua? If you would rather help me in PM's I can do that too. Thank you very much


It's physics that have to be written entirely in LUA, and taking into account such things as rotational inertia and momentum. It's quite complicated. Actually, nobody thought it possible until I showed the way in November 2013.
User avatar
mrennie
 
Posts: 3214
Joined: Wed May 30, 2012 12:22 pm

Re: Pennsy K4 Add-on

Unread postby JohnS » Tue Jul 28, 2015 2:58 pm

mrennie wrote:It's physics that have to be written entirely in LUA, and taking into account such things as rotational inertia and momentum. It's quite complicated. Actually, nobody thought it possible until I showed the way in November 2013.


Well that's way above me and with no model reference to go on I guess I'm done then. I will make a couple of adjustment to things then that's all I can do. I don't know lua except what I was tinkering with. Trial and error and making notes of what did what. Oh well, Thank you mrennie for the insight and your awesome steam power.
User avatar
JohnS
 
Posts: 1116
Joined: Sun Dec 29, 2013 6:48 am
Location: Portage IN


Return to Rolling-Stock Design

Who is online

Users browsing this forum: Googlebot and 1 guest

cron