egg|nomz|egg changed the topic of #kspacademia to: https://gist.github.com/pdn4kd/164b9b85435d87afbec0c3a7e69d3e6d | Dogs are cats. Spiders are cat interferometers. | Космизм сегодня! | Document well, for tomorrow you may get mauled by a ネコバス. | <UmbralRaptor> egg|nomz|egg: generally if your eyes are dewing over, that's not the weather. | <ferram4> I shall beat my problems to death with an engineer.
<egg|anbo|egg>
!wpn UmbralRaptor
* Qboid
gives UmbralRaptor a normal orb/pyramid hybrid
<UmbralRaptor>
"Till created the first version of beamer for his PhD defense presentation in February 2003. A month later, he put the package on ctan at the request of some colleagues. After that, things somehow got out of hand."
<UmbralRaptor>
This is not a reassuring thing to see in a manual.
<egg|anbo|egg>
UmbralRaptor: there should be a shadow transit and a great red spot near the edge afaict, I see neither
<egg|anbo|egg>
nice bands though
<UmbralRaptor>
ctan, properly spelled "C'tan"…
<UmbralRaptor>
egg|anbo|egg: 2 belts?
<egg|anbo|egg>
UmbralRaptor: yeah probably
<UmbralRaptor>
(belts = dark, zones = light)
<egg|anbo|egg>
2 belts + a hint of the higher latitudes being a bit dark
<egg|anbo|egg>
it's going to go out the window soon
<egg|phone|egg>
!Wpn UmbralRaptor
* Qboid
gives UmbralRaptor an alternator
<UmbralRaptor>
!wpn egg|phone|egg
* Qboid
gives egg|phone|egg a FORTRAN pharmacy
<UmbralRaptor>
Drug prescriptions on punch cards.
<soundnfury>
!wpn UmbralRaptor
* Qboid
gives UmbralRaptor a zygohistomorphic pharmacy-like Kountdown
<UmbralRaptor>
!wa soundnfury
<Qboid>
UmbralRaptor: Seems that Wolfram is unable to understand that.
<UmbralRaptor>
!wpn soundnfury
* Qboid
gives soundnfury an irrotational moderator
<UmbralRaptor>
<_<;;
vigili has quit [Remote host closed the connection]
<soundnfury>
Apparently I am not comprehensible to tungsten.
<egg|phone|egg>
!Wpn whitequark
* Qboid
gives whitequark a cathode ray һοmοɡاурһ
* whitequark
squints at homoglyph
APlayer has joined #kspacademia
<egg|phone|egg>
Whitequark: I think it's an alef
<egg|phone|egg>
Wait the h is weird too
<egg|phone|egg>
!u һοmοɡاурһ
<Qboid>
U+04BB CYRILLIC SMALL LETTER SHHA (һ)
<Qboid>
U+03BF GREEK SMALL LETTER OMICRON (ο)
<Qboid>
U+FF4D FULLWIDTH LATIN SMALL LETTER M (m)
<Qboid>
U+03BF GREEK SMALL LETTER OMICRON (ο)
<Qboid>
U+0261 LATIN SMALL LETTER SCRIPT G (ɡ)
<Qboid>
U+0627 ARABIC LETTER ALEF (ا)
<Qboid>
U+0443 CYRILLIC SMALL LETTER U (у)
<Qboid>
U+0440 CYRILLIC SMALL LETTER ER (р)
<Qboid>
U+04BB CYRILLIC SMALL LETTER SHHA (һ)
<egg|phone|egg>
Ah.
<APlayer>
So, I've been wondering... If you need an equation that aims to describe the velocity a falling thing in an atmosphere, how would you go about that? You can't just integrate gravitational and aero forces, because the latter depend on the velocity
awang has quit [Ping timeout: 207 seconds]
awang has joined #kspacademia
awang has quit [Ping timeout: 194 seconds]
<soundnfury>
APlayer: so it's a differential equation
<soundnfury>
which you then have to solve, which is sorta like integration but worse
<soundnfury>
(or you can integrate it numerically, because aero DEs are a bear)
* APlayer
grumbles
awang has joined #kspacademia
awang has quit [Ping timeout: 207 seconds]
<APlayer>
soundnfury: So we are at the Y' = f(t, Y) part again, and Y = (posX, posY, posZ, velX, velY, velZ)?
<APlayer>
I want to avoid numeric integration because I am working in real time on a rather slow system. Plus, there is a challenge
<egg|anbo|egg>
real time gives you plenty of time
<APlayer>
I am talking about constant recalculation about ten times a second. Not sure if an analytic approach would be even significantly faster, but anyway, I wanted to try solving it (last but not least) for the challenge
<APlayer>
I guess I have an approximate idea regarding what I need to do
<egg|anbo|egg>
APlayer: ten times a second is not a lot
<egg|anbo|egg>
we've been over this many times
<APlayer>
We as in me and you, or you and someone else?
<egg|anbo|egg>
you, me, UmbralRaptor, etc., here
<egg|anbo|egg>
you keep thinking real-time is hard for ODEs
<egg|anbo|egg>
(reasonably well-behaved physical ODEs like this)
<egg|anbo|egg>
now, for aero PDEs there's not a chance of coming close to real time
<APlayer>
I guess it becomes an aero ODE?
<APlayer>
But anyway, even if it is possible in realtime (I doubted it, because this is a kOS script, and kOS limits things to 200000 instructions/sec), I still wanted to solve such an equation, because I am not at all familiar with how this kind of maths works
<egg|anbo|egg>
unless you're starting to model the behaviour of the fluid around your falling thing (in which case talk to ferram4_ and despair), you're going to grab a cute drag equation and this is a perfectly nice ODE which will solve itself by throwing a decent integrator at it
<egg|anbo|egg>
APlayer: well, get used to disappointment; most ODEs aren't going to have a nice analytic solution (that even includes 2-body gravitation, position as a function of time there involves the Kepler equation which you either throw a solver at or turn into a useless series)
<APlayer>
I hope it's a rather simple case, because I am basically working in one dimension
<APlayer>
Actually in two, but I am pretty certain I can ignore the second dimension for now
<egg|anbo|egg>
the analytic approach is going to be hard and not practically useful, but have fun
<APlayer>
Humm, thanks a lot! I'll have a look at that once I am done setting up the equation
<egg|anbo|egg>
APlayer: (and read the rest of that PDF someday, it's useful to know some introductory calculus)
<APlayer>
IIRC you sent me that quite a while ago already, I have it bookmarked in my "to read one day"-folder
<ferram4_>
Go with what egg says. Numerical solutions will be faster.
<ferram4_>
Especially if you're dealing with aero.
<ferram4_>
Especially if you want to model drag in particular.
<APlayer>
Just wanted to use Q * Cd * A for drag
<APlayer>
Is that even reasonable?
<ferram4_>
If you have Cd as a function of velocity (or, more accurately, as a function of Mach number, which is a function of velocity and sound speed, and sound speed is a function of temp, which is a function of altitude), then yeah, it's reasonable.
<ferram4_>
I'm actually not sure what other options you would use, considering that more complicated models are kind of... difficult to do in real time.
<APlayer>
I was planning to get a few approximations of Cd at reasonable Mach numbers and linearly approximate between the data points. I guess I can measure Cd by accelerating to a given Mach number horizontally, cutting the engines off and measuring the horizontal force, right?
<APlayer>
The horizontal force would then be equal to Q * Cd * A, and I would get Cd and A as a single vessel constant out of that
<APlayer>
What is Cd * S in KSPs stock GUI, though?
<ferram4_>
S and A are the same thing.
<APlayer>
Okay, that makes things a great deal easier
<APlayer>
I can just launch once, pause occasionally and note Mach number vs. Cd * A
<ferram4_>
It is better to calculate out Cd itself and then enter A/S as a variable when starting the script.
<ferram4_>
Then you can use the script for similar-ish vehicles without too much error in between them so long as the differences aren't that stupid.
<APlayer>
But how can I separate Cd and A?
<APlayer>
Is that a simple function of rocket diameter?
<ferram4_>
A / S should remain constant. It's just supposed to be a reference area for the sake of scaling.
<ferram4_>
The purpose of coefficients is that for identical shapes they will be identical, regardless of the shape's true size.
<APlayer>
Yes, but in practice, I can only measure Cd and A together, or not?
<ferram4_>
There should be a way to grab them separately.
<ferram4_>
Through stock's aero, no idea, but it should be possible.
<ferram4_>
Welp, if those are the only numbers you have access to, your original method is the best one.
<APlayer>
Alright... But it seems to be simple enough to set up a Mach vs. Cd curve, I can just do it individually per vessel
<APlayer>
Given that I don't plan to change this vessel configuration significantly anytime soon, I guess this is a script exclusively tuned for one rocket
<ferram4_>
Concentrate most of your data points between Mach 0.5 and 3, with a large concentraton near Mach 1. The other regions shouldn't change too much.
<APlayer>
I was planning to get data points every Mach 0.1, and am currently at 4.0. Around Mach 1, I may try to get them every Mach 0.05. Is that reasonable?
<ferram4_>
I'd only say you need that much data between 0.8 and 1.2, even that might be a bit much.
<APlayer>
Alright
<ferram4_>
Like, the data really doesn't vary too much except right around Mach 1 generally.
<APlayer>
I guess I will keep going with 0.1 steps, then, because that seems rather convenient to try to set up a best-fit curve
<APlayer>
Humm, can a shape in theory be reconstructed if an accurate Mach vs. Cd curve is given?
<egg|anbo|egg>
!wpn ferram4_
* Qboid
gives ferram4_ an entangled symbol
<egg|anbo|egg>
!wpn bofh
* Qboid
gives bofh an int Eva
<egg|anbo|egg>
!wpn whitequark
* Qboid
gives whitequark an infinite endomorphism
<soundnfury>
!wpn egg|anbo|egg
* Qboid
gives egg|anbo|egg a lugubrious orbit
ferram4_ has quit [Ping timeout: 200 seconds]
<APlayer>
Ok, so what do you guys use for curve fitting?
<kmath>
<stephentyrone> @kittenpies3 if there are poles in/near the interval of interest, Padé approximations are an attractive alternative… https://t.co/IpdhF7xJDD
<egg|anbo|egg>
soundnfury: APlayer wants silly things for no reason :-p
<APlayer>
I wanted a single function because that's something I can work with when calculating further things
<APlayer>
How would I do that with a function that's split into multiple parts?
* APlayer
half expects that this is even possible
<egg|anbo|egg>
UmbralRaptor: also from the cat's perspective (and with the tripod eggstended) the scope does start to look aa little smol on this mount :-p
<kmath>
<bofh453> @whitequark Not sure if that's better or worse than having your most-visited page *by far* be wikipedia:"List of trigonometric identities".
* egg|anbo|egg
gives bofh a hacked-over cosine
<APlayer>
egg: But if I am doing something completely wrong, please let me know. I don't want to do things that are /too/ stupid because I don't know better
<egg|anbo|egg>
I mostly have no idea what you're trying to do at this point; what are you doing with this fit? why?
<APlayer>
So, this is the rockets Cd * A plotted against the Mach number
<soundnfury>
egg|anbo|egg: I think he wants to use it as a coefficient in a DE
<APlayer>
This will be part of the drag equation in the DE, so if I interpret "coefficient" correctly, then yes, that's true
<soundnfury>
"coefficient" interpreted loosely here, it's really a function
<APlayer>
Well, yes, in that case you are correct
<egg|anbo|egg>
and why the hell can it not be piecewise polynomial
<egg|anbo|egg>
are you still trying to solve it analytically?
<APlayer>
Yes, I am
<APlayer>
I just wanted to derive an equation, that's it
<APlayer>
Be right back, sorry
<egg|anbo|egg>
"I don't want to do things that are /too/ stupid because I don't know better" << to be clear, solving this analytically is going to fall squarely in there (and is going to go nowhere, your RHS is some horrendous function that you get by fitting experimental data!)
<soundnfury>
yeah you will _not_ be able to solve this sucker analytically
<egg|anbo|egg>
further, no-one else here will
e_14159 has quit [Ping timeout: 200 seconds]
<APlayer>
Alright, then
<APlayer>
Well, then I am implementing a numerical solver, although I hoped that was not necessary
e_14159 has joined #kspacademia
* egg|anbo|egg
stabs eyelashes
<egg|anbo|egg>
UmbralRaptor: does white spirit work to clean eyepieces
<kmath>
<volatile_void> @stephentyrone Considering how hard lolremez is to convince to do what it's already supposed to do, I'm not going to extend it. Sound like…
<egg|anbo|egg>
wait there's actually an implementation called lolremez?! Ꙩ_ꙩ
<kmath>
<bofh453> Pet peeve: people computing matrix inverses when what they want is a solution to an Ax = b problem. Bonus points if… https://t.co/tGftAeo4e3
* egg|anbo|egg
glares at ferram4_ though
<ferram4_>
Hi
<ferram4_>
Incidentally I'll probably need to solve one of those problems sooner or later for the Proc Engines project.
<bofh>
egg|anbo|egg: apparently some people have never heard of back-substitution???
<egg|anbo|egg>
ferram4_: you solved a 3d linearar system iteratively somewhere in ksp though right :-p
<ferram4_>
Big UGLY chemical equilibrium calcs. :P
<ferram4_>
Also, yes. Don't remember for what though.
<egg|anbo|egg>
s/rar/r/
<Qboid>
egg|anbo|egg meant to say: ferram4_: you solved a 3d linear system iteratively somewhere in ksp though right :-p
<bofh>
egg|anbo|egg: which, like, honestly confuses me since, like, if you have (LU)x = b, and you know matrices are associative, then L(Ux) = b should be really obvious to figure out how to solve, at least Ux = b, then the rest is just similar.
<bofh>
ferram4_: how nasty chemical equilibrium problems?
<egg|anbo|egg>
ferram4_: please ping bofh or me with that when you get to it, sounds fun :-p
<ferram4_>
Basic, in comes X number of these atoms with Y enthalpy and Z pressure, calculate the resulting gas composition, and then calculate how that varies as a function of pressure (for accelerating down the nozzle)
<ferram4_>
NASA's got a paper for their Chemical Equilibrium with Applications thing somewhere and I'll need to reimplement that.
<bofh>
ferram4_: yeah this isn't bad at all
<ferram4_>
I have no experience with this type, so that's why. Also, no idea how many products I'll end up with.
ferram4_ is now known as ferram4|afk
<egg|anbo|egg>
UmbralRaptor: hm clouds seem to be gone momentarily but I'm in bed and it's cold out