FireDynamics / ARTSS

ARTSS is an Accelerator-based Real Time Smoke Simulator, which specialises in fast calculation of smoke propagation
MIT License
11 stars 7 forks source link

Bug: Random Noise Maker is not used correctly #194

Closed LinhWuerzburger closed 2 years ago

LinhWuerzburger commented 2 years ago

Noisemaker produces values has the parameters range and step_size, which produce values in [-range, range] with the given step size.

In the case of using an absolute value, the noisemaker has to be used in this way: any_field += noise_maker->random_field(any_field.get_size()); in the case of using a relative value, the noisemaker has to be used in this way:

auto noise = noise_maker->random_field(any_field.get_size());
noise += 1; 
any_field *= noise;

but currently, it is used in this way: any_field *= noise_maker->random_field(any_field.get_size());

Therefore I would expect negative values as well, resulting in a huge difference between the original and the distorted value, which is definitely not how it should be.

LinhWuerzburger commented 2 years ago

Fixed in this PR: Noisemaker stays the same as it is. But the temperature source functions now differ between absolute and relative noise. This enables the option (relative/absolute) in the XML. Now the XML part for the random parameters for the temperature source is the same as in the initial conditions.

LinhWuerzburger commented 2 years ago

image

all values should be positive. or at least close to zero