diff options
| author | savask <savask@yandex.ru> | 2012-03-09 16:41:34 (GMT) |
|---|---|---|
| committer | savask <savask@yandex.ru> | 2012-03-09 16:45:36 (GMT) |
| commit | 71acd578b69fc03319e6adf1528eec29ceb8e6b0 (patch) | |
| tree | 1ed35aef8d82c67e7070472841b349d8d6317dff /src | |
| parent | 290cac8b7e0a10a91fefa41618130e478b44c2a9 (diff) | |
| download | powder-71acd578b69fc03319e6adf1528eec29ceb8e6b0.zip powder-71acd578b69fc03319e6adf1528eec29ceb8e6b0.tar.gz | |
(REALISTIC) Better air<->body heat conduction. Air density now
influences on it (things don't heat vacuum).
Diffstat (limited to 'src')
| -rw-r--r-- | src/powder.c | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/src/powder.c b/src/powder.c index ddf7ebc..2d010b2 100644 --- a/src/powder.c +++ b/src/powder.c @@ -1881,16 +1881,25 @@ void update_particles_i(pixel *vid, int start, int inc) #endif if (aheat_enable) { +#ifdef REALISTIC + c_heat = parts[i].temp*96.645/ptypes[t].hconduct*fabs(ptypes[t].weight) + + hv[y/CELL][x/CELL]*100*(pv[y/CELL][x/CELL]+273.15f)/256; + c_Cm = 96.645/ptypes[t].hconduct*fabs(ptypes[t].weight) + + 100*(pv[y/CELL][x/CELL]+273.15f)/256; + pt = c_heat/c_Cm; + pt = restrict_flt(pt, -MAX_TEMP+MIN_TEMP, MAX_TEMP-MIN_TEMP); + parts[i].temp = pt; + //Pressure increase from heat (temporary) + pv[y/CELL][x/CELL] += (pt-hv[y/CELL][x/CELL])*0.004; + hv[y/CELL][x/CELL] = pt; +#else c_heat = (hv[y/CELL][x/CELL]-parts[i].temp)*0.04; c_heat = restrict_flt(c_heat, -MAX_TEMP+MIN_TEMP, MAX_TEMP-MIN_TEMP); parts[i].temp += c_heat; hv[y/CELL][x/CELL] -= c_heat; -#ifdef REALISTIC - //Volume increase from heat (temporary) - pv[y/CELL][x/CELL] -= c_heat*0.004; #endif } - c_heat = 0.0f; + c_heat = 0.0f; c_Cm = 0.0f; for (j=0; j<8; j++) { surround_hconduct[j] = i; |
