Install Steam
login
|
language
简体中文 (Simplified Chinese)
繁體中文 (Traditional Chinese)
日本語 (Japanese)
한국어 (Korean)
ไทย (Thai)
Български (Bulgarian)
Čeština (Czech)
Dansk (Danish)
Deutsch (German)
Español - España (Spanish - Spain)
Español - Latinoamérica (Spanish - Latin America)
Ελληνικά (Greek)
Français (French)
Italiano (Italian)
Bahasa Indonesia (Indonesian)
Magyar (Hungarian)
Nederlands (Dutch)
Norsk (Norwegian)
Polski (Polish)
Português (Portuguese - Portugal)
Português - Brasil (Portuguese - Brazil)
Română (Romanian)
Русский (Russian)
Suomi (Finnish)
Svenska (Swedish)
Türkçe (Turkish)
Tiếng Việt (Vietnamese)
Українська (Ukrainian)
Report a translation problem
it works. you can edit the code to change the ratio
Target temperature T0
Input gases at temperatures T1 and T2
M1 is mixer input 1 setting (ie the value you send to the mixer to set it)
M1 = abs(T2-T0)/(abs(T1-T0)+abs(T2-T0))
Examples:
Gas 1 at 375K, gas 2 at 250K, target temp 275K:
Mixer setting is 25/(100+25)= 20%
Gas 1 at 500K, gas 2 at 250K, target temp 275K:
Mixer setting is 25/(225+25)= 10%
Gas 1 at 300K, gas 2 at 150K, target temp 275K:
Mixer setting is 125/(25+125)= 83%
Gas 1 at 250K, gas 2 at 375K, target temp 275K:
Mixer setting is 100/(100+25)= 80%
From the first and last examples, you'll see it doesn't matter which way round hot and cold are - the system will compensate
It goes slightly wrong when it needs under 1% or over 99%, because one gas is very hot and the other is close to target temperature, because the mixer just takes an integer and you can't therefore feed in numbers like 0.1%, even programatically
Gas 1 at 1275K, gas 2 at 270K, target temp 275K:
Mixer setting is 5/(1000+5)= 0.5%, but you'll actually get a setting of 1%, resulting in gas at 280K
Of course it all goes wrong when both are above or both are below the target and thus there's no valid mix...
Gas 1 at 300K, gas 2 at 375K, target temp 275K:
Mixer setting is 100/(100+25)= 80% (resulting gas will be at 315K)
Gas 1 at 875K, gas 2 at 675K, target temp 275K:
Mixer setting is 400/(600+400)= 40% (resulting gas will be at 755K!!)
But barring that "minor" issue, the calculation is simple enough to implement however you prefer - with IC code (simplest and my preferred solution) or logic chips (from memory, I think you need 6 to do the calculation plus a memory for the target, 2 readers and 1 writer)