Heat simulation improvement.
This commit is contained in:
parent
304a2fa819
commit
5e43bb0510
@ -1638,6 +1638,7 @@ void update_particles_i(pixel *vid, int start, int inc)
|
|||||||
hv[y/CELL][x/CELL] -= c_heat;
|
hv[y/CELL][x/CELL] -= c_heat;
|
||||||
}
|
}
|
||||||
c_heat = 0.0f;
|
c_heat = 0.0f;
|
||||||
|
float c_Cm = 0.0f;
|
||||||
for (j=0; j<8; j++)
|
for (j=0; j<8; j++)
|
||||||
{
|
{
|
||||||
surround_hconduct[j] = i;
|
surround_hconduct[j] = i;
|
||||||
@ -1650,12 +1651,14 @@ void update_particles_i(pixel *vid, int start, int inc)
|
|||||||
&&(rt!=PT_FILT||(t!=PT_BRAY&&t!=PT_PHOT&&t!=PT_BIZR&&t!=PT_BIZRG)))
|
&&(rt!=PT_FILT||(t!=PT_BRAY&&t!=PT_PHOT&&t!=PT_BIZR&&t!=PT_BIZRG)))
|
||||||
{
|
{
|
||||||
surround_hconduct[j] = r>>8;
|
surround_hconduct[j] = r>>8;
|
||||||
c_heat += parts[r>>8].temp;
|
c_heat += parts[r>>8].temp*96.645/ptypes[rt].hconduct*ptypes[rt].weight;
|
||||||
|
c_Cm += 96.645/ptypes[rt].hconduct*ptypes[rt].weight;
|
||||||
h_count++;
|
h_count++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
pt = parts[i].temp = (c_heat+parts[i].temp)/(h_count+1);
|
pt = parts[i].temp = (c_heat+parts[i].temp*96.645/ptypes[t].hconduct*ptypes[t].weight)
|
||||||
|
/(c_Cm+96.645/ptypes[t].hconduct*ptypes[t].weight);
|
||||||
for (j=0; j<8; j++)
|
for (j=0; j<8; j++)
|
||||||
{
|
{
|
||||||
parts[surround_hconduct[j]].temp = pt;
|
parts[surround_hconduct[j]].temp = pt;
|
||||||
|
Loading…
Reference in New Issue
Block a user