Fix: Prevent liquid leaking through effector with default settings

When a liquid is created together with collision/effector with default
settings, it often happens that the liquid is leaking through the solid
object/effector.

Change the CFL default value to decrease the chance of this happening.
There appears to be no noticeable performance impact in common cases.

Pull Request: https://projects.blender.org/blender/blender/pulls/120355
This commit is contained in:
Bartosz Kosiorek
2024-04-15 14:55:31 +02:00
committed by Brecht Van Lommel
parent ddb4aba4ef
commit 9a0a75eff0
2 changed files with 5 additions and 2 deletions

View File

@@ -154,7 +154,7 @@
.time_per_frame = 0.0f, \
.frame_length = 0.0f, \
.time_scale = 1.0f, \
.cfl_condition = 4.0f, \
.cfl_condition = 2.0f, \
.timesteps_minimum = 1, \
.timesteps_maximum = 4, \
.slice_per_voxel = 5.0f, \

View File

@@ -2465,7 +2465,10 @@ static void rna_def_fluid_domain_settings(BlenderRNA *brna)
prop = RNA_def_property(srna, "use_adaptive_timesteps", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, nullptr, "flags", FLUID_DOMAIN_USE_ADAPTIVE_TIME);
RNA_def_property_ui_text(prop, "Use Adaptive Time Steps", "");
RNA_def_property_ui_text(
prop,
"Use Adaptive Time Steps",
"Lets the solver automatically decide when to perform multiple simulation steps per frame");
RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_Fluid_datacache_reset");
prop = RNA_def_property(srna, "timesteps_min", PROP_INT, PROP_NONE);