Mantaflow instability #85212

Closed
opened 2021-01-29 20:44:24 +01:00 by Fernando Alcala · 16 comments

System Information
Operating system: Windows-10-10.0.19041-SP0 64 Bits
Graphics card: GeForce GTX 1080 Ti/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 456.71

Blender Version
Broken version: 2.91.0, branch: master, commit date: 2020-11-25 08:34, hash: 0f45cab862
2.92.0 Beta, branch: master, commit date: 2021-01-19 17:58, hash: c2e6969c56
2.93.0 Beta, branch: master, commit date: 2021-04-17 19:55, hash: 4bce9c5283

Short description of error
Mantaflow has several issues. Timestepping is especially broken. Any timestep values above 1 or off will cause the base simulation and modifiers, such as dissolve and vorticity, to misbehave.

Exact steps for others to reproduce the error
Add quick liquid to default cube.
Set minimum and maximum timesteps to 100.
Bake to frame 70 and watch the liquid explode.
11110001-0070.mp4


Turning off adaptive timesteps and setting minimum and maximum timesteps to 1 seems to be equal. The following sims have their minimum and maximum timestep set to what is said.

Timestep 1. It's 5 minutes long to show the consistency (you don't have to watch it all).
256 front0001-7112.mp4
Timestep 100 front view:
256 100 frnt0001-0243.mp4
and bottom view:
256 100 bottom0001-0243.mp4
Here I explore a frame:
mantaflow bias.mp4

The next thing I try is rotating the domain. The strange flow continues to "follow" the y=x plane of the domain.
domain rot 32 100 1000001-0127.mp4
domain rot 2 32 100 1000001-0127.mp4

The same thing happens with fire.
Timestep 1:
fire 256 1 10001-0070.mp4
Timestep 100:
fire 0vort 100 1000001-0163.mp4

And it breaks fire vorticity. The previous ones had fire vorticity 0, the following have the default 0.5
Domain 256. Notice the subtle y=x leaning smoke:
fire 256 100 1000001-0452.mp4
Domain 32:
fire go burr0001-0190.mp4

Smoke vorticity is broken.
Vorticity .1 timestep 1:
smoke 32 vort .1 1 10001-0250.mp4
Vorticity .1 timestep 100:
smoke 32 vort .1 100 1000001-0250.mp4

Smoke dissolve is broken.
Default dissolve 5 and slow, timestep 1:
smoke 64 dissolve 5 1 10001-0250.mp4
You can immediately see a difference at just timestep 2:
smoke 64 dissolve 5 2 20001-0250.mp4
Timestep 100, the video looks like it isn't playing, but that's because the smoke dissolves immediately:
smoke 32 dissolve 5 100 1000001-0250.mp4

Here's some smoke noise.
Upres 4, timestep 1:
smoke 32 noise 4 1 10001-0250.mp4
Timestep 100:
smoke 32 noise 4 100 1000001-0250.mp4
Domain 64. This issue is mentioned in #81017 as may be related to time-stepping, but it seems like it doesn't work "right" even with adaptive timesteps off:
noise compare0001-0250.mp4

It also breaks fluid.
APIC, domain 32 timestep 1:
water apic 32 10001-0250.mp4
APIC, domain 32 timestep 100:
water apic 32 1000001-0250.mp4
FLIP, domain 32 timestep 100:
water flip 32 100 1000001-0090.mp4
FLIP, domain 256 timestep 1:
water flip 256 1 10001-0250.mp4
APIC, domain 256 timestep 100. This took 6 days to bake. There are no additional particles or inflow, so all the weirdness is due to the timestep. It looks really cool though:
water apic 2sam 3nbw 265 100 1000001-0187.mp4

**System Information** Operating system: Windows-10-10.0.19041-SP0 64 Bits Graphics card: GeForce GTX 1080 Ti/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 456.71 **Blender Version** Broken version: 2.91.0, branch: master, commit date: 2020-11-25 08:34, hash: `0f45cab862` 2.92.0 Beta, branch: master, commit date: 2021-01-19 17:58, hash: `c2e6969c56` 2.93.0 Beta, branch: master, commit date: 2021-04-17 19:55, hash: `4bce9c5283` **Short description of error** Mantaflow has several issues. Timestepping is especially broken. Any timestep values above 1 or *off* will cause the base simulation and modifiers, such as dissolve and vorticity, to misbehave. **Exact steps for others to reproduce the error** Add quick liquid to default cube. Set minimum and maximum timesteps to 100. Bake to frame 70 and watch the liquid explode. [11110001-0070.mp4](https://archive.blender.org/developer/F9964435/11110001-0070.mp4) --- Turning off adaptive timesteps and setting minimum and maximum timesteps to 1 seems to be equal. The following sims have their minimum and maximum timestep set to what is said. Timestep 1. It's 5 minutes long to show the consistency (you don't have to watch it all). [256 front0001-7112.mp4](https://archive.blender.org/developer/F9588887/256_front0001-7112.mp4) Timestep 100 front view: [256 100 frnt0001-0243.mp4](https://archive.blender.org/developer/F9588950/256_100_frnt0001-0243.mp4) and bottom view: [256 100 bottom0001-0243.mp4](https://archive.blender.org/developer/F9588951/256_100_bottom0001-0243.mp4) Here I explore a frame: [mantaflow bias.mp4](https://archive.blender.org/developer/F9588952/mantaflow_bias.mp4) The next thing I try is rotating the domain. The strange flow continues to "follow" the y=x plane of the domain. [domain rot 32 100 1000001-0127.mp4](https://archive.blender.org/developer/F9588962/domain_rot_32_100_1000001-0127.mp4) [domain rot 2 32 100 1000001-0127.mp4](https://archive.blender.org/developer/F9588961/domain_rot_2_32_100_1000001-0127.mp4) The same thing happens with fire. Timestep 1: [fire 256 1 10001-0070.mp4](https://archive.blender.org/developer/F9588967/fire_256_1_10001-0070.mp4) Timestep 100: [fire 0vort 100 1000001-0163.mp4](https://archive.blender.org/developer/F9588958/fire_0vort_100_1000001-0163.mp4) And it breaks fire vorticity. The previous ones had fire vorticity 0, the following have the default 0.5 Domain 256. Notice the subtle y=x leaning smoke: [fire 256 100 1000001-0452.mp4](https://archive.blender.org/developer/F9588968/fire_256_100_1000001-0452.mp4) Domain 32: [fire go burr0001-0190.mp4](https://archive.blender.org/developer/F9588979/fire_go_burr0001-0190.mp4) Smoke vorticity is broken. Vorticity .1 timestep 1: [smoke 32 vort .1 1 10001-0250.mp4](https://archive.blender.org/developer/F9601510/smoke_32_vort_.1_1_10001-0250.mp4) Vorticity .1 timestep 100: [smoke 32 vort .1 100 1000001-0250.mp4](https://archive.blender.org/developer/F9601514/smoke_32_vort_.1_100_1000001-0250.mp4) Smoke dissolve is broken. Default dissolve 5 and slow, timestep 1: [smoke 64 dissolve 5 1 10001-0250.mp4](https://archive.blender.org/developer/F9601568/smoke_64_dissolve_5_1_10001-0250.mp4) You can immediately see a difference at just timestep 2: [smoke 64 dissolve 5 2 20001-0250.mp4](https://archive.blender.org/developer/F9601570/smoke_64_dissolve_5_2_20001-0250.mp4) Timestep 100, the video looks like it isn't playing, but that's because the smoke dissolves immediately: [smoke 32 dissolve 5 100 1000001-0250.mp4](https://archive.blender.org/developer/F9601522/smoke_32_dissolve_5_100_1000001-0250.mp4) Here's some smoke noise. Upres 4, timestep 1: [smoke 32 noise 4 1 10001-0250.mp4](https://archive.blender.org/developer/F9601748/smoke_32_noise_4_1_10001-0250.mp4) Timestep 100: [smoke 32 noise 4 100 1000001-0250.mp4](https://archive.blender.org/developer/F9601747/smoke_32_noise_4_100_1000001-0250.mp4) Domain 64. This issue is mentioned in #81017 as may be related to time-stepping, but it seems like it doesn't work "right" even with adaptive timesteps off: [noise compare0001-0250.mp4](https://archive.blender.org/developer/F9601749/noise_compare0001-0250.mp4) It also breaks fluid. APIC, domain 32 timestep 1: [water apic 32 10001-0250.mp4](https://archive.blender.org/developer/F9601623/water_apic_32_10001-0250.mp4) APIC, domain 32 timestep 100: [water apic 32 1000001-0250.mp4](https://archive.blender.org/developer/F9601625/water_apic_32_1000001-0250.mp4) FLIP, domain 32 timestep 100: [water flip 32 100 1000001-0090.mp4](https://archive.blender.org/developer/F9603054/water_flip_32_100_1000001-0090.mp4) FLIP, domain 256 timestep 1: [water flip 256 1 10001-0250.mp4](https://archive.blender.org/developer/F9603073/water_flip_256_1_10001-0250.mp4) APIC, domain 256 timestep 100. This took 6 days to bake. There are no additional particles or inflow, so all the weirdness is due to the timestep. It looks really cool though: [water apic 2sam 3nbw 265 100 1000001-0187.mp4](https://archive.blender.org/developer/F9601626/water_apic_2sam_3nbw_265_100_1000001-0187.mp4)

Added subscriber: @Fernando-Alcala

Added subscriber: @Fernando-Alcala

Can't believe I didn't think of this. Here are some tests of 2400 fps simulations with no timestepping, the temporal equivalence of 24 fps and 100 timestepping.
Smoke, 64 domain, 2400fps edited to real-time. Looks exactly like 24fps with 100 timestepping:
fast smoke0001-0241.mp4

APIC, 64 domain:
apic compare0001-0073.mp4
The 2400fps one is still jelly-like, but there is no stringing at least.
FLIP, 64 domain:
flip comp0001-0060.mp4
FLIP got worse.

See me next week when I test smaller scale domains.

Can't believe I didn't think of this. Here are some tests of 2400 fps simulations with no timestepping, the temporal equivalence of 24 fps and 100 timestepping. Smoke, 64 domain, 2400fps edited to real-time. Looks exactly like 24fps with 100 timestepping: [fast smoke0001-0241.mp4](https://archive.blender.org/developer/F9860898/fast_smoke0001-0241.mp4) APIC, 64 domain: [apic compare0001-0073.mp4](https://archive.blender.org/developer/F9862055/apic_compare0001-0073.mp4) The 2400fps one is still jelly-like, but there is no stringing at least. FLIP, 64 domain: [flip comp0001-0060.mp4](https://archive.blender.org/developer/F9862061/flip_comp0001-0060.mp4) FLIP got worse. See me next week when I test smaller scale domains.

Create two cubes. The domain is 25cm25cm50cm at 0X 0Y 15cmZ and the cube is 10cm10cm10cm at 0X 0Y 0Z. Everything is default expect for the timestepping.

timestep 1 compare0001-0250.mp4
timestep 100 compare0001-0250.mp4
You can see the x=y bias very nicely on frame 7.
bottom view slow0001-0240.mp4
This one was simulated at 2400fps
2400fps0001-0024.mp4

Create two cubes. The domain is 25cm25cm50cm at 0X 0Y 15cmZ and the cube is 10cm10cm10cm at 0X 0Y 0Z. Everything is default expect for the timestepping. [timestep 1 compare0001-0250.mp4](https://archive.blender.org/developer/F9863243/timestep_1_compare0001-0250.mp4) [timestep 100 compare0001-0250.mp4](https://archive.blender.org/developer/F9863244/timestep_100_compare0001-0250.mp4) You can see the x=y bias very nicely on frame 7. [bottom view slow0001-0240.mp4](https://archive.blender.org/developer/F9863242/bottom_view_slow0001-0240.mp4) This one was simulated at 2400fps [2400fps0001-0024.mp4](https://archive.blender.org/developer/F9863241/2400fps0001-0024.mp4)

Forgot to do liquids. APIC. By the way, version: 2.92.0, branch: master, commit date: 2021-02-24 16:25, hash: 02948a2cab
compare0001-0100.mp4

compare slowed down0001-0100.mp4

Forgot to do liquids. APIC. By the way, version: 2.92.0, branch: master, commit date: 2021-02-24 16:25, hash: `02948a2cab` [compare0001-0100.mp4](https://archive.blender.org/developer/F9864974/compare0001-0100.mp4) [compare slowed down0001-0100.mp4](https://archive.blender.org/developer/F9864972/compare_slowed_down0001-0100.mp4)

Viscosity testing. For PIC, FLIP ratio is set to 0. For FLIP, FLIP ratio is set to 1.
timestep 1 viscosity on compare0001-0120.mp4

timestep 100 viscosity on compare0001-0120.mp4

This top view finally shows the y=x biasing that we've seen before, but now in liquids.
pic 32 100 viscosity top view0001-0120.mp4

I haven't tested PIC before, so here are some regular timestep comparisons.
timestep 100 no viscosity compare0001-0120.mp4

timestep 1 no viscosity compare0001-0120.mp4

Comparing Mantaflow to FlipFluids with the same setup. Base fps of 240, APIC, domain 256, min 1, max 100, CFL 4. Domain is 10cm^3 at Z=5cm, sphere has a diameter of 2cm at Z=8cm, base fluid is 1cm tall at Z=.5cm.
What is this trash
b10001-0240.mp4
Finally, something that looks beautiful. I love all the details that get captured. The individual droplets of water creating craters. The splashing water folding over itself.
10001-0240.mp4

Dropping stability test. 24fps, APIC, domain 1024, min 1, max 40, CFL 4. Domain is 5cmx5cmx2m, sphere is 2cm at Z=98cm. Rigid body on right for reference.
srop 10001-0050.mp4
FlipFluids manages to maintain its sphere shape while Mantaflow does Mantaflow.

Viscosity testing. For PIC, FLIP ratio is set to 0. For FLIP, FLIP ratio is set to 1. [timestep 1 viscosity on compare0001-0120.mp4](https://archive.blender.org/developer/F9921244/timestep_1_viscosity_on_compare0001-0120.mp4) [timestep 100 viscosity on compare0001-0120.mp4](https://archive.blender.org/developer/F9921243/timestep_100_viscosity_on_compare0001-0120.mp4) This top view finally shows the y=x biasing that we've seen before, but now in liquids. [pic 32 100 viscosity top view0001-0120.mp4](https://archive.blender.org/developer/F9921241/pic_32_100_viscosity_top_view0001-0120.mp4) I haven't tested PIC before, so here are some regular timestep comparisons. [timestep 100 no viscosity compare0001-0120.mp4](https://archive.blender.org/developer/F9921240/timestep_100_no_viscosity_compare0001-0120.mp4) [timestep 1 no viscosity compare0001-0120.mp4](https://archive.blender.org/developer/F9921238/timestep_1_no_viscosity_compare0001-0120.mp4) Comparing Mantaflow to FlipFluids with the same setup. Base fps of 240, APIC, domain 256, min 1, max 100, CFL 4. Domain is 10cm^3 at Z=5cm, sphere has a diameter of 2cm at Z=8cm, base fluid is 1cm tall at Z=.5cm. What is this trash [b10001-0240.mp4](https://archive.blender.org/developer/F9949170/b10001-0240.mp4) Finally, something that looks beautiful. I love all the details that get captured. The individual droplets of water creating craters. The splashing water folding over itself. [10001-0240.mp4](https://archive.blender.org/developer/F9949166/10001-0240.mp4) Dropping stability test. 24fps, APIC, domain 1024, min 1, max 40, CFL 4. Domain is 5cmx5cmx2m, sphere is 2cm at Z=98cm. Rigid body on right for reference. [srop 10001-0050.mp4](https://archive.blender.org/developer/F9950702/srop_10001-0050.mp4) FlipFluids manages to maintain its sphere shape while Mantaflow does Mantaflow.
Fernando Alcala changed title from Increasing timesteps in Mantaflow causes chaotic results to Mantaflow instability 2021-04-18 21:01:04 +02:00
Member

Added subscriber: @ankitm

Added subscriber: @ankitm
Member

we'll have to break this down into multiple reports..
for the record, can confirm the first issue: timesteps 100 fluid issue around frame 60. reminds me of #85702 (Mantaflow -> fluid affectors (collision) starting/stopping moving in high-res domains (~>256) cause massive shockwave throughout whole fluid domain).

we'll have to break this down into multiple reports.. for the record, can confirm the first issue: timesteps 100 fluid issue around frame 60. reminds me of #85702 (Mantaflow -> fluid affectors (collision) starting/stopping moving in high-res domains (~>256) cause massive shockwave throughout whole fluid domain).

Most of it is just experimentation. What you'll find in the end are two main issues.

  1. Large timesteps cause strange behaviors in the base simulation.
  • Also affects vorticity and dissolve as if the influence of these isn't divided by the timestep. I don't know if it directly affects fluid particles. Since the simulations are overly energetic at high timesteps, is the increase of particles from the base sim or timestep?
  1. The domain is asymmetric.
Most of it is just experimentation. What you'll find in the end are two main issues. 1. Large timesteps cause strange behaviors in the base simulation. - Also affects vorticity and dissolve as if the influence of these isn't divided by the timestep. I don't know if it directly affects fluid particles. Since the simulations are overly energetic at high timesteps, is the increase of particles from the base sim or timestep? 2. The domain is asymmetric.
Member

Changed status from 'Needs Triage' to: 'Needs User Info'

Changed status from 'Needs Triage' to: 'Needs User Info'
Member

Please attach files/ steps (mainly the values of various settings) for effects on

  • vorticity
  • domain symmetry
Please attach files/ steps (mainly the values of various settings) for effects on - vorticity - domain symmetry

Added subscriber: @hal9000

Added subscriber: @hal9000

Add quick smoke to default cube. Set vorticity to .1.
220001-0048.mp4

Conveniently, the domain asymmetry is also seen. Of course, as shown previously, we can also show it easily with viscous PIC.
1 10 20 100 top0001-0048.mp4

For lower timestepping, longer run-times are needed to see the effect.
1 2 long top0001-0720.mp4

Add quick smoke to default cube. Set vorticity to .1. [220001-0048.mp4](https://archive.blender.org/developer/F10203291/220001-0048.mp4) Conveniently, the domain asymmetry is also seen. Of course, as shown previously, we can also show it easily with viscous PIC. [1 10 20 100 top0001-0048.mp4](https://archive.blender.org/developer/F10208474/1_10_20_100_top0001-0048.mp4) For lower timestepping, longer run-times are needed to see the effect. [1 2 long top0001-0720.mp4](https://archive.blender.org/developer/F10208476/1_2_long__top0001-0720.mp4)
Member

Changed status from 'Needs User Info' to: 'Needs Triage'

Changed status from 'Needs User Info' to: 'Needs Triage'
Member

Added subscriber: @OmarEmaraDev

Added subscriber: @OmarEmaraDev
Member

Changed status from 'Needs Triage' to: 'Archived'

Changed status from 'Needs Triage' to: 'Archived'
Member

Thanks for the detailed report! We split this report to multiple simpler reports in #89431 and #95928. We will track each report individually in its task.

Thanks for the detailed report! We split this report to multiple simpler reports in #89431 and #95928. We will track each report individually in its task.
Sign in to join this conversation.
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset Browser
Interest
Asset Browser Project Overview
Interest
Audio
Interest
Automated Testing
Interest
Blender Asset Bundle
Interest
BlendFile
Interest
Collada
Interest
Compatibility
Interest
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
Interest
EEVEE
Interest
EEVEE & Viewport
Interest
Freestyle
Interest
Geometry Nodes
Interest
Grease Pencil
Interest
ID Management
Interest
Images & Movies
Interest
Import Export
Interest
Line Art
Interest
Masking
Interest
Metal
Interest
Modeling
Interest
Modifiers
Interest
Motion Tracking
Interest
Nodes & Physics
Interest
OpenGL
Interest
Overlay
Interest
Overrides
Interest
Performance
Interest
Physics
Interest
Pipeline, Assets & IO
Interest
Platforms, Builds & Tests
Interest
Python API
Interest
Render & Cycles
Interest
Render Pipeline
Interest
Sculpt, Paint & Texture
Interest
Text Editor
Interest
Translations
Interest
Triaging
Interest
Undo
Interest
USD
Interest
User Interface
Interest
UV Editing
Interest
VFX & Video
Interest
Video Sequencer
Interest
Virtual Reality
Interest
Vulkan
Interest
Wayland
Interest
Workbench
Interest: X11
Legacy
Blender 2.8 Project
Legacy
Milestone 1: Basic, Local Asset Browser
Legacy
OpenGL Error
Meta
Good First Issue
Meta
Papercut
Meta
Retrospective
Meta
Security
Module
Animation & Rigging
Module
Core
Module
Development Management
Module
EEVEE & Viewport
Module
Grease Pencil
Module
Modeling
Module
Nodes & Physics
Module
Pipeline, Assets & IO
Module
Platforms, Builds & Tests
Module
Python API
Module
Render & Cycles
Module
Sculpt, Paint & Texture
Module
Triaging
Module
User Interface
Module
VFX & Video
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Priority
High
Priority
Low
Priority
Normal
Priority
Unbreak Now!
Status
Archived
Status
Confirmed
Status
Duplicate
Status
Needs Info from Developers
Status
Needs Information from User
Status
Needs Triage
Status
Resolved
Type
Bug
Type
Design
Type
Known Issue
Type
Patch
Type
Report
Type
To Do
No Milestone
No project
No Assignees
5 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: blender/blender#85212
No description provided.