# Simulation Options - Hybrido

The “Stepping” sections can be described as RealFlow accuracy. The more time steps, the better and more precise the simulation will turn out. The parameters already indicate that RealFlow uses an adaptive method to calculate the best number of steps within the specified range between “MIN and MAX substeps”. To achieve a fixed time step, "MIN substeps" and "MAX substeps" must be equal.

### Stepping (Liquid - Hybrido Solver)

This section is responsible for RealFlow's Hybrido grid fluid solver. As you can see, there are also “MIN and MAX substeps” and they have exactly the same function as their particle fluids counterparts. Because of the used HyFLIP technology, our grid fluid solver can work with much lower “MAX substeps” to create stable fluids. The substeps are the number of subdivisions the solver performs in order to move the fluid. Higher settings will produce better and more accurate results. RealFlow's Hybrido solver does not need very high values, making it very fast.

Please note that the final number of substeps used for a simulation is determined by the values of the “General > Stepping” section. There is also an example showing you the relation between the different substeps parameters.

##### Time scale

With this parameter you can decelerate or accelerate Hybrido fluid simulations easily – completely independent from any “FPS Output” settings: a value smaller than 1 will decelerate the fluid, while settings greater than 1 have an acceleration effect. Please be aware that higher settings most probably have an influence on the solver's collision detection with objects and you might observe leaking objects. In this case, please visit the "Volumes and Distance Fields” page. There you will find tips and tricks on how to avoid this unwanted behaviour.

##### MIN substeps

With this parameter you can change the solver's lower number of time steps.

##### MAX substeps

If you want to increase accuracy, please change this value.

##### Strictness

The substeps in RealFlow subdivide the simulation into portions of variable length. The solver calculates how fast the fluid will move within this time span. The number of steps depends on the maximum velocity of the fluid and the length of each grid cell. With a value of 1.0, the fluid will not move more than 1 grid cell in the current time step. With values smaller than 1.0, the fluid can cover a longer distance within a single step - the solver is less strict.

### Pressure solver (Liquid - Hybrido Solver)

One of RealFlow’s grid fluid’s main characteristics is that the fluid is nearly incompressible. Incompressibility does not automatically imply that the fluid itself cannot be compressed. It means that density remains constant within a (very small) parcel of fluid which moves with the fluid’s velocity. This state can be achieved by making the velocity field divergence-free. Divergence is not so easy to explain in a physically correct way, but as an approximation we can say that the solver always tries to keep the volume of a fluid parcel constant. To achieve a constant volume, the Hybrido has to solve a complex system of linear equations using an iterative method – this is the number you enter under “MAX iterations”. The exactness of this process, on the other hand, is controlled with “Accuracy”. With a high value, the solution of the equation system is very precise and very close to the exact solution.

##### MAX iterations

In most cases, the default setting is sufficient, but for very small “Cell length” values it can be necessary to increase the value. In such cases you will have the following message:

`The pressure solver didn't converge to the chosen accuracy for HY_Domain01 at frame XY. `

Even though a solution was found it might not fulfill your expectations.

To fix this you can increase the number of iterations in the simulation options.

Another situation, where you can see this message, is when a scene contains very complex geometry. Then, it can happen that Hybrido will not be able to find a solution – even with a very high amount of iterations. One method to deal with this problem is to increase the objects’ “Surface offset” parameter in the “Volume” panel. When you increase this value, the object will appear less complex to the Hybrido solver and there will be a higher possibility of a solution. If you still receive this message, the only way for a successful simulation is to change the interacting objects’ geometry inside your 3D program.

Nevertheless, RealFlow’s Hybrido technology will always “do its best” to find a solution for making the fluid incompressible and will provide at least an acceptable approximation – even in cases without a mathematically correct solution.

##### Accuracy

This parameter ranges between 0 and 1. With 0, the pressure solver will quickly find a solution, but it will not be very accurate. A value of 1, on the other hand, will find a solution that is very close to the exact behaviour.

### Viscosity Solver (Liquid - Hybrido Solver)

##### MAX iterations

In most cases, the default setting is sufficient, but under some circumstances it can be necessary to increase this value, for example when you see a warning message. Normally you will not see any misbehaving particles and you can proceed with the simulation. We recommend creating an OpenGL preview to see if the fluid behaves correctly.

##### Accuracy

This value ranges between 0 and 1. With 0, the solver will quickly find a solution, but it will not be very accurate. A value of 1, on the other hand, will find a solution that is very close to the exact behaviour, but simulation time will increase. The default value of 0.2 represents a good balance between simulation speed and accuracy.

### Transport (Liquid - Hybrido Solver)

RealFlow's HyFLIP technology also uses particles, for example to describe the grid fluid's surface. It is therefore necessary to move them through the grid. With this section's parameter you can control the quality of the process.

##### Particle steps

This is the number of steps the solver uses to move the particles through the grid.

### Collision Fractions Computation Mode (Liquid - Hybrido Solver)

Calculating accurate fluid-object collisions is a very complex process, and really depends on the collision object's shape and geometry. Therefore it is – in some rare cases – necessary to differentiate and change the method of detecting collisions. Please note that there is normally no reason to switch from “Face area” to “Supersampling”.

##### Face area

This is the fastest method and can be used in most situations. The good thing is that “Face area” does not add artificial friction to the fluid when it is colliding with an object. This means that the fluid's behaviour is not affected. The other side of the coin is that some collision objects are not recognized correctly – this is mainly the case with sharp-edged or spiky objects. Here, it is possible that the “Face area” method might not be accurate enough and you should consider using “Supersampling”.

##### Supersampling

If you can see collision problems which cannot be solved with “Surface offset”, “Domain offset”, or smaller cell sizes then you might want to use this method instead of “Face area”. Supersampling is very accurate, but also computationally intense and adds some artificial friction to the fluid. With curved surfaces, “Supersampling” should not be used, because you might see and unwanted alias effect in areas where the fluid touches the object's surface. It is, however, a good choice if collision objects show many sharp angles.

##### Samples

With “Supersampling” set “Yes” you can adjust the accuracy of the method here. The entered value will be raised to the power of three to get the final number of samples inside a cell. For example, when “Samples” is set to 3 then the total number of samples will be 3 x 3 x 3 = 27.

### OpenCL (Liquid - Hybrido Solver)

RealFlow's Hybrido solver can exploit OpenCL-capable hardware to perform grid fluid simulations. OpenCL is not only restricted to graphics cards, but can also be used with CPUs; RealFlow even allows you to combine both devices. It will strongly depend on your hardware and computer setup whether OpenCL devices:

can be used at all

really accelerate a simulation

RealFlow provides features to check whether your GPU and CPU are OpenCL-capable or not. It can also happen that your computer has OpenCL capabilities, but the simulation is very slow anyway. If you can observe this behaviour, please disable the OpenCL features and perform the simulation exclusively on the CPU. RealFlow support the usage of multiple GPUs.

Please note that here, the OpenCL functions are adjusted and activated/deactivated for the current scene. If you want to change your selection globally, please go to

**Preferences > Simulation > OpenCL**

##### System Information…

With this button you can request a detailed report of the OpenCL capabilities of your computer. OpenCL needs particular hardware specifications and not all hardware/graphic devices fulfil these requirements. Under “Processing Devices Info” you can find an overview of the available devices. If the “System Information” cannot find a particular device, the corresponding option will be not available in the “Simulation options” window (and the appropriate “Preferences” panel).

The “OpenCL Platform Info” is important as well, because there you can find information about the used OpenCL version. If this version is not at *least* “OpenCL 1.1” and "Compute Capability 2.0" then the graphics card cannot be used for GPU-based simulations. Even if your hardware fulfills all requirements, it can happen that your GPU does not contribute to a simulation – this is mainly the case with AMD graphic boards. If a GPU is not considered you will most probably notice slightly increased simulation times.

Under “OpenCL Devices Info” you can find additional information about the number of units (“cores”) that can be used for a simulation, as well the clock frequency. These parameters determine the simulation speed. If your GPU has moderate capabilities, it is very likely that you will not benefit from an OpenCL-based simulation. In this case it is better to use the standard CPU simulation.

##### Use OpenCL-CPU

This option is only available if your computer supports OpenGL-CPU calculations.

##### Use OpenCL-GPU

You can use this feature if your graphics card has OpenCL capability, otherwise the option is greyed out.

##### Use OpenCL-Accelerator

This functions requires dedicated OpenCL-acceleration hardware and these devices have to be purchased separately. As long as your computer is not equipped with such an accelerator board this option is disabled.

### Stepping (Liquid - Particles Solver)

With these settings you can easily control the accuracy of the secondary elements, for example splashes. Secondary elements are always considered dumb particles and therefore do not need very high “MAX substeps”. The default values should be sufficient for most applications. This solver is also called “HySPH”.

##### MIN substeps

This is the minimum number of time steps for the simulation. To achieve a fixed number, “MIN substeps” and “MAX substeps” must share equal values, e.g. 5/5.

##### MAX substeps

Here you can enter the solver's upper limit of time steps. Higher values increase accuracy, but also simulation time.