SSU Development thread (4.0 to 5.0) [DEVELOPMENT HALTED DUE TIME REQUIREMENTS!]

Status
Not open for further replies.
Actually, no real gas is ideal. That is what ideal is all about. :lol: And H2 is the real gas that gets closest to the ideal.

If you would calculate internal energy, you would need to calculate it differently for the two gases, compared to Helium, which is monoatomic.

[math]U = \frac{7}{2} N k_B T[/math]

This here is the better formula to approximate real gases, but again, it is an approximation:

https://en.wikipedia.org/wiki/Van_der_Waals_equation

The ideal gas law works well on the MPS He, the pressure trace matches pretty well with the SODB.
I tried the VDW (that was the first one I tried) and that gives negative pressures, as it's "flawed" in the area where we need.
 
The ideal gas law works well on the MPS He, the pressure trace matches pretty well with the SODB.
I tried the VDW (that was the first one I tried) and that gives negative pressures, as it's "flawed" in the area where we need.

Sorry to tell you it that hard again: It is not flawed. You are using negative numbers as inputs somewhere. Neither this equation, nor ideal gas law can produce negative pressures at all, when properly implemented!
 
Sorry to tell you it that hard again: It is not flawed. You are using negative numbers as inputs somewhere. Neither this equation, nor ideal gas law can produce negative pressures at all, when properly implemented!
Go ahead:
waals.gif

Code:
	vol (m^3)	mass (g)	temp (K)
O2	0.3171487	354255.6	97
H2	0.6056973	41730.5		22

I get the following:
Code:
	press (psia)
O2	-60831.50931
H2	5493.368945

when it should be somewhere near ~840 on O2 and ~220 on H2.
 
What did you assume for a and b? Using 0 for both (ideal gas) gets the following results (with your mass, volume and temperature):

Gas | P (psi)
H2|907
O2|4083


---------- Post added at 02:42 PM ---------- Previous post was at 02:22 PM ----------

Ah yes... found the bug when analysing the VDW equation for the term that causes it to go negative:

Your density is too high! :rofl: You simulate a gas at a temperature lower than Tc with the density of the liquid.
 
What did you assume for a and b? Using 0 for both (ideal gas) gets the following results (with your mass, volume and temperature):

Gas | P (psi)
H2|907
O2|4083

That matches what I got. The a and b come from tables (I actually checked more than one to make sure there weren't several different opinions), and/or from formulas. I used these:
Code:
	a (Pa.m^3)	b (m^3/mol)
O2	0.1382		0.00003186
H2	0.02453		0.00002651
 
Some sanity check of the data, density is your input data, density max. is the maximum possible with vdW:

Gas | H2 | O2
Density|68.89662543|1117.001583
Density max.|75.75648253|1004.35656


---------- Post added at 02:54 PM ---------- Previous post was at 02:51 PM ----------

Comparison again with the data I quickly researched while the database compiles:

Gas | H2 | O2
a|0.02508807|0.14003115
b|0.00002661|0.00003186
 
Ah yes... found the bug when analysing the VDW equation for the term that causes it to go negative:

Your density is too high! :rofl: You simulate a gas at a temperature lower than Tc with the density of the liquid.

Just now I was doing the dishes and thinking about how the temperatures are lower than the critical temperatures.... :shifty:

---------- Post added at 02:19 PM ---------- Previous post was at 02:19 PM ----------

Comparison again with the data I quickly researched while the database compiles:

Gas | H2 | O2
a|0.02508807|0.14003115
b|0.00002661|0.00003186

...and the units?
 
Last edited by a moderator:
...and the units?

Should be some combination of m³, mol and Pa.

---------- Post added at 03:45 PM ---------- Previous post was at 03:22 PM ----------

Just now I was doing the dishes and thinking about how the temperatures are lower than the critical temperatures.... :shifty:

You just need to remember that the van-de-waals equation is known to be inaccurate in this region, but with corrections (like by Maxwell) existing.

But the more accurate simulation would be calculating a mixture between saturated gas and liquid, with the liquid taking part of the tank volume and the gas taking the rest.
 
I've just committed the small correction to the UNIV PTG talked about in the other thread, and I tried to add the remaining tracking features... but (1) right now I can't wrap my head around it all and (2) the architecture in there needs to change to support other the other tracking modes... so nothing of much value was added except for more accurate checks to the input data and corrected body vector numbers for the -Y ST. For now TGT ID 2 (center of the Earth) is still the only accepted target.
I'll continue with my "research" to upgrade the lights to the "UV system".
 
I'm on the final strech of a probably-too-big update to the vc lights (and other parts), and I want to ask if anyone knows how the RMS master alarm sounded? Is it like the "main" master alarm?

---------- Post added at 03:58 PM ---------- Previous post was at 11:07 AM ----------

I'm on the final strech of a probably-too-big update to the vc lights (and other parts), and I want to ask if anyone knows how the RMS master alarm sounded? Is it like the "main" master alarm?

For now it uses the "standard" CW tone (I generated a new one and also the other CW sounds), and if it's wrong it can always be changed. Anyway, the RMS master alarm will now come on when the a joint passes its reach limits.

In other news, I just finished committing the massive visual upgrade to the vc: most lights and PBIs are now done! Probably the majority still isn't used, but they all can be tested with the Lamp Test switches (a trick to "bypass" the momentary contact feature in those switches is to click and drag the mouse away, and the switch will "stick").
Only the lights on panel L1, A2 and A7U are missing, or weren't upgraded yet, but their time will come.
I also did a few light-related corrections to the ODS panel, DAP PBIs and the PCT stuff.
 
VC lights are (finally) done! :hailprobe:
 
Your wish is my command:
attachment.php

attachment.php

attachment.php

attachment.php

attachment.php

attachment.php

The images don't have the best of qualities because I can't really push my computer as this morning I think I fried my graphics card. :facepalm:
 

Attachments

  • lights1.PNG
    lights1.PNG
    449.4 KB · Views: 653
  • lights2.PNG
    lights2.PNG
    426 KB · Views: 645
  • lights3.PNG
    lights3.PNG
    148.1 KB · Views: 638
  • lights4.PNG
    lights4.PNG
    442.2 KB · Views: 641
  • lights5.PNG
    lights5.PNG
    369.8 KB · Views: 821
  • lights6.PNG
    lights6.PNG
    405.6 KB · Views: 640
I can check with my card, if something is really fried there. ;)

But it looks good in your pictures :)

About the obsolete API calls: I would suggest fixing the query calls by adding abstract data sources and inject suitable Orbiter API data sources for them.

e.g. "AbstractAirDataSource" and "Orbiter2016AirDataSource". This way we can get a step closer to test our code by unit tests and are easier able to fix things for future releases.
 

Thanks, that made me look at the panel groups and not only I found the problem (only the aft group was hiding its panels with own mesh), but I also found why panels in the port aft panel group weren't working (missing call to that group). If it wasn't for this missing call, the Centaur and IUS panels would also have been visible, but as they weren't working in the port aft group, I added them to the aft group, which made them "immune" to this visibility issue.
I also got the panel groups to be called (for whatever) in the same order, but all of this didn't fix panel F4 not working sometimes.
 
Guys , I found this in Landing_SOP.cpp it says: dps\Landing_SOP.cpp(42): warning C4482: nonstandard extension used: enum 'AnimState::Action' used in qualified name can you fix it ?
 
Guys , I found this in Landing_SOP.cpp it says: dps\Landing_SOP.cpp(42): warning C4482: nonstandard extension used: enum 'AnimState::Action' used in qualified name can you fix it ?

Done.
 
Status
Not open for further replies.
Back
Top