I have a fluid stream to compute F # code. The code consists of two projects. The main library and project to run the simulation. When I run a parametric type study
open CoreLibrary
for lbmViscosity in [0.1] do
for Re in [0.001; 0.5] do
for lbmD in [6.;5.;4.;3.;2.5;2.;1.5;1.;0.8;0.6;0.4;0.2] do
simulation setup
let result = call CoreLibrary
save result to file
then I get the correct result. When I run the code like:
open CoreLibrary
for lbmViscosity in [0.1] do
for Re in [0.1; 0.001; 0.5] do
for lbmD in [6.;5.;4.;3.;2.5;2.;1.5;1.;0.8;0.6;0.4;0.2] do
simulation setup
let result = call CoreLibrary
save result to file
Then for Re = 0.001 I get the wrong result. I also tried Array.iter instead of a loop with the same result. When I compile my code and run it as exe with different input parameters, it works well.
Is there anything that can lead to an incorrect result besides a mutation? Maybe this is a garbage collector error? And is there any command that would completely clear the memory in a specific place? Sort of:
open CoreLibrary
for lbmViscosity in [0.1] do
for Re in [0.1; 0.001; 0.5] do
for lbmD in [6.;5.;4.;3.;2.5;2.;1.5;1.;0.8;0.6;0.4;0.2] do
clean everything
simulation setup
let result = call CoreLibrary
save result to file
, for. , Array.iter, .
, ..:)
, , - !:) coreLibrary ConcurrentDictionary. Records Classes ( : D), , -. , dll , ... , . .