流體動力學
本文主要講解Dynamics折疊欄中的內容。原文地址:https://docs.chaosgroup.com/display/PHX3MAX/Liquid+Dynamics
主要內容
- Overview 綜述
- Parameters 參數
- Surface Tension 表面張力
- Wetting 潮濕
綜述
This rollout controls the fluid's motion parameters.此折疊欄控制流體的運動參數。
UI Path: ||Select Liquid Simulator | LiquidSim object|| > Modify panel > Dynamics rollout
參數
Simulate Air Effects | simair – When enabled, turns on the built-in air simulator.打開內建的空氣模擬。
Strong sources or fast moving obstacles inside the simulator will create air velocities to carry splash, mist, and foam particles at high speed.模擬器中強源或快速移動的障礙將帶入空氣激起快速的飛濺,霧,泡沫顆粒等效果。
Used mostly when realistic mist is needed.主要用於對霧模擬的需要。
The simulation is not expensive, but can dramatically increase the splash and mist quality.模擬並不耗費太多資源,但可以顯著提高飛濺和霧的質量。
The air effects stop affecting particles once they exit the simulator, thus altering the particle speed and direction around the simulator walls.一旦粒子離開模擬器,空氣效應就會停止影響粒子,從而改變粒子在模擬器壁面周圍的速度和方向。
Motion Inertia | ext_wind – When enabled, moving the simulator object over a series of frames causes inertial forces in the opposite direction of the movement. 當啟用時,在一系列幀上移動模擬器對象會導致運動方向相反的慣性力。
This allows you to link the simulator to a moving object and keep the size of the grid relatively small, as opposed to creating a large grid that covers the entire path of the moving object.
這允許您將模擬器鏈接到一個移動對象,並保持網格的大小相對較小,而不是創建一個覆蓋移動對象的整個路徑的大網格。
Motion Inertia can be used for moving ground and water vehicles, torches, fireballs, rockets, etc. 運動慣量可用於移動地面和水上車輛、火把、火球、火箭等。
When this option is used together with the Initial Fill Up(初始填充) option and Open Container Wall(打開容器壁) conditions, a simulation of moving an object over a sea surface can be done.
當這個選項和初始填充與打開容器壁選項一起使用時,可以模擬物體在海面上的運動。
For more information, see the Motion Inertia example below.詳情可以參見原文的實例。
Gravity | grav, gmul – When enabled, a standard gravity of 9.8 m/s 2 is automatically added. This value is a multiplier and scales the gravity accordingly. You can also use negative gravity.地球引力系數。
Initial Fill Up | initfill, flevel – When enabled, the container is filled up with liquid when the simulation starts. 將容器填滿粒子。
The numeric field determines the fill-up level, measured in % of the Z size. 填充的高度由z軸的百分比確定。
When this option is used with Open Container Walls, the container can be moved and the grid will behave as part of an infinite ocean.當此選項和 打開容器壁 一起啟用時,容器可以移動,網格將作為無限海洋的一部分。
For liquid simulations using Confine Geometry(限制幾何體), you can enable Clear Inside on the geometry and liquid will not be created at simulation startup in the voxels inside the geometry.
使用限制幾何體模擬流體時,可以在幾何體上啟用 清除內部,那么仿真開始時就不會在幾何體內部創建流體。
! The liquid created through the Initial Fill Up option will be initialized with the values set for the Default RGB and Default Viscosity parameters below.通過初始填充選項創建的液體將使用下面為默認RGB和默認粘度參數設置的值初始化。
Fill Up For Ocean | oceanfill – Change the Open Container Walls of the simulator so that they would act like there is an infinite liquid volume beyond them.改變模擬器的開放容器壁,使其表現得像有一個無限的液體體積超過它們。
Pressure would be created at the simulator walls in order to support the liquid, and if the surface of a wall below the Initial Fill Up level or the bottom is cleared from liquid during simulation, new incoming liquid would be created.為了支持液體,會在模擬壁上產生壓力,如果在模擬過程中,低於初始填充水平或底部的壁面被從液體中清除,就會產生新的進入液體。
In order to eliminate air pockets between Solid geometry and the liquid mesh, this option will automatically set all Solid voxels below the Initial Fill Up level to contain Liquid amount of 1, even if they don't contain any Liquid particles.為了消除實體幾何和液體網格之間的空隙,這個選項會自動將所有低於初始填充水平的實體體素設置為包含液體量為1,即使它們不包含任何液體顆粒。
If you don't want this effect, enable Clear Inside from the Phoenix FD Properties of the Solid geometry.如果你不想要這樣的效果,可以從Phoenix FD的實體幾何啟用清除內部選項。
! All simulator walls must be set to Open for Fill Up For Ocean to take effect.所有模擬壁必須設置為打開,以使 海洋填充 生效。
Steps per Frame | spf – Determines how many calculations of the simulated grid are performed between two consecutive frames of the timeline.確定在時間軸的兩個連續幀之間執行多少模擬網格的計算。
! One of the most important parameters of the simulator, with significant impact on quality and performance.這是模擬器最重要的參數之一,對模擬器的質量和性能有着重要的影響。
To understand how to use it, keep in mind that the simulation is a sequential process and happens step by step. 要理解如何使用它,請記住模擬是一個循序漸進的過程,是一步一步進行的。
It produces good results if each simulation step introduces small changes, but it's also a trade-off between performance and detail, as described below.如果每個模擬步驟都引入了小的更改,那么它將產生良好的結果,但是這也是性能和細節之間的權衡,如下所述。
For example, if you have an object that is hitting the liquid surface with high speed, the result will be not good if at the first step the object is far away from the water, and at the second step, the object is already deep under the water. You have to introduce intermediate steps until the changes of each step get small enough. This parameter creates these steps within each frame.例如,如果你有一個物體高速撞擊液體表面,如果第一步物體離水很遠,第二步物體已經在水的深處,那么結果就不好。您必須引入中間步驟,直到每個步驟的更改足夠小。此參數在每個幀中創建這些步驟。
A value of 1 means that there are no intermediate steps and each step is exported into the cache file.值1表示沒有中間步驟,每個步驟都導出到緩存文件中。
A value of 2 means that there is one intermediate step, i.e. each second step is exported to the cache file while the intermediate steps are just calculated, but not exported.值2表示有一個中間步驟,即每第二步導出到緩存文件,而中間步驟只計算,不導出。
Signs that this parameter needs to be increased are:需要增加該參數的跡象有:
-
- Liquid simulations have too many single liquid particles.液體模擬中有太多的單一液體顆粒。
- Liquid simulations are torn and chaotic.液體模擬是撕裂和混亂的。
- Liquid simulations of streams have steps or other periodical artifacts.流的液體模擬有步驟或其他周期性的偽影。
- Fire/Smoke simulations have artifacts that produce a grainy appearance.火災/煙霧模擬有產生顆粒狀外觀的偽影。
More often than not, those issues will be caused by the simulation moving too quickly (e.g. the emission from the source is very strong or the objects in the scene are moving very fast).
通常情況下,這些問題是由於模擬移動得太快造成的(例如,來自源的輻射非常強,或者場景中的物體移動非常快)。
In such cases you should use a higher SPF.這種情況下,你需要增大SPF。
Keep in mind that higher Steps Per Frame decreases the performance in a linear way, i.e. if you increase the SPF twice, your simulation will go twice as slow.記住,每幀更高的步長會以線性的方式降低性能,也就是說,如果你將SPF值提高兩倍,你的模擬速度就會降低一倍。
However, the quality does not have a linear relation to the SPF.然而,仿真效果與SPF並不是線性相關的。
Each simulation step kills fine details, and thus for maximum detail it's best to use the lowest possible SPF that runs without any of the issues mentioned above.每個模擬步驟都會破壞細節,因此為了獲得最大的細節,最好使用盡可能低的SPF值,這樣就不會出現上面提到的任何問題。
For additional information, please refer to Phoenix FD Explained.
Time Scale | timescale – Specifies a time multiplier that can be used for slow motion effects. For more information, see the Time Scale example below.控制仿效果的速度,值越小,動畫越慢。
!In order to achieve the same simulation look when changing the Time Scale, the Steps per frame value must be changed accordingly.為了在改變時間尺度時獲得相同的仿真效果,必須相應地改變每幀值的步長。
For example, when decreasing the Time Scale from 1.0 to 0.5, Steps per frame must be decreased from 4 to 2.例如,Time Scale從1變為0.5時,SPF要從4變為2.
All animated objects in the scene (moving objects and sources) must be adjusted as well.場景中的所有動畫對象(移動對象和源)也必須調整。
Active Bodies Mult | fluidToSolidInteractionMult - A multiplier for the effect of the Velocity channel on the Active Bodies in the Simulator.速度通道對模擬器中主動體影響的乘法器。
To convert a polygon object into an Active Body, enable the Active Body checkbox in the Phoenix FD Properties for that object.若要將多邊形對象轉換為活動體,請在該對象的Phoenix FD屬性中啟用活動體復選框。
Default RGB | lq_default_rgb - The Simulator is filled with this RGB color at simulation start.模擬器在模擬開始時使用這種RGB顏色。
The Default RGB is also used to color the fluid generated by Initial Fill Up, or by Initial Liquid Fill from the Phoenix FD Properties of a geometry - both of these options create liquid only at the start of the simulation. During simulation, more colors can be mixed into the sim by using a Phoenix FD Liquid Source with RGB enabled, or the color of existing fluid can be changed over time by using a Phoenix FD Mapper. If a Phoenix FD Liquid Source does not have RGB enabled, it also emits using the Default RGB value.
!The RGB Grid Channel has to be enabled in the Output Rollout for this parameter to take effect.
RGB Diffusion | rgbdiff – Control how quickly the colors of particles are mixed over time during the simulation.控制粒子的顏色在模擬過程中混合的速度。
When it's set to 0, each FLIP liquid particle carries its own color, and the color of each individual particle does not change when liquids are mixed. This means that if red and green liquids are mixed, a dotted red-green liquid will be produced instead of a yellow liquid. This parameter allows the colors of particles to change when the particles are in contact, thus achieving uniform color in the resulting mixed liquid. For more information, see the RGB Diffusion example below.
Default Viscosity | lqvisc – Determines the default viscosity of the liquid.流體粘度
This value is used when no viscosity information for the emitted liquid is provided to the Simulator by the Source.當源沒有向模擬器提供所排放液體的粘度信息時,使用此值。
For more information, see the Viscosity example below.值越大,流體越粘。
- All FLIP liquid particles are set to this viscosity value at simulation start. You should use higher viscosity for thicker liquids such as chocolate, cream, etc
- The Default Viscosity is also used for the fluid generated by Initial Fill Up, or by Initial Liquid Fill from the Phoenix FD Properties of a geometry - both of these options create liquid only at the start of the simulation.
- If a Phoenix FD Liquid Source does not have Viscosity enabled, it emits using the Default Viscosity value.如果流體源沒有啟用粘度,則使用默認粘度。
- During simulation, liquids of variable viscosity can be mixed into the sim by using a Phoenix FD Liquid Source with Viscosity enabled.在模擬過程中,使用具有粘度功能的Phoenix FD液體源,可以將變粘度的液體混合到sim中。
- The Viscosity Grid Channel export has to be enabled in the Output Rollout for variable viscosity simulations to work.粘度網格通道導出必須在輸出折疊欄中啟用,以使可變粘度模擬能夠工作。
- The viscosity of existing liquid can be changed over time by using a Phoenix FD Mapper in order to achieve melting or solidifying of fluids.現有的液體粘度可以隨着時間的變化,使用Phoenix FD映射器,以實現熔融或固化的液體。
- You can shade the liquid mesh or particles using the fluid's viscosity with the help of the Phoenix Grid Texture or Particle Texture.
- It's important to note that using viscosity does not automatically make the liquid sticky.需要注意的是,使用粘度並不會自動使液體具有粘性。
For example, molten glass is viscous, but not sticky at all.例如,熔融玻璃是粘性的,但一點也不粘。
Stickiness can be enabled explicitly from the Wetting parameters section.粘性可以從潤濕參數部分顯式啟用。
If Stickiness is not enabled, even the most viscous fluid would slide from the surfaces of geometries or from the jammed walls of the Simulator.如果不啟用粘性,即使是最粘稠的流體也會從幾何圖形的表面或模擬器卡住的牆壁上滑出。
Viscosity Diffusion | viscdiff - Phoenix FD supports sourcing of fluids with different viscosity (thickness) values.Phoenix FD支持多種不用粘度的流體。
This parameter specifies how quickly they blend together.此參數指定它們混合的速度。
A low value will preserve the distinct viscosities, while a high value will allow them to mix together and produce a fluid with a uniform thickness.低粘度值將保持不同的粘度,而高粘度值將使它們混合在一起,產生厚度相同的流體。
Non-Newtonian | nonnewt – Modifies the viscosity with respect to the liquid's velocity to overcome the conflict between viscosity and wetting, where a high viscosity of real liquids prevents wetting.改變粘度相對於液體的速度,以克服粘度和潤濕之間的沖突,在高粘度的實際液體防止潤濕。
Non-Newtonian liquids are liquids that behave differently at different velocities. This parameter accounts for this behavior by decreasing the viscosity in areas where the liquid is moving slowly and retains a higher viscosity where the liquid is moving quickly. For example, to cover a cookie with liquid chocolate, high viscosity is needed in the pouring portion of the motion to obtain the curly shape of the chocolate as it lands on the cookie and begins to settle down. On the other hand, a smooth chocolate is needed to settle in over the cookie without roughness and holes. If the viscosity is high enough, the chocolate might look right during the pouring and settling motions but won't settle in to form a smooth thin layer over the cookie. This parameter decreases the viscosity where the liquid is moving slowly (over the surface of the cookie) while keeping the faster-moving stream tight and highly viscous. For more information, see the Non-Newtonian example below.
Droplets Surfing | dsurf – This parameter affects the liquid and the splash particles, controlling how long a particle hovers on the surface before it merges with the liquid.這個參數影響液體和飛濺粒子,控制粒子在與液體融合之前在表面停留的時間。
The parameter is used mostly in ocean/wave simulations.該參數主要用於海洋/波浪模擬。
表面張力
Strength | lqsurft – Controls the force produced by the curvature of the liquid surface. 控制液體表面曲率產生力的大小。
This parameter plays an important role in small-scale liquid simulations because an accurate simulation of surface tension indicates the small scale to the audience.該參數在小型液體模擬中起着重要的作用,因為對表面張力的精確模擬可以向觀眾顯示小尺度。
Lower Strength values will cause the liquid to easily break apart into individual liquid particles, while higher values will make it harder for the liquid surface to split and will hold the liquid particles together.
較低的強度值會使液體容易分裂成單個的液體顆粒,而較高的強度值會使液體表面更難分裂,並將液體顆粒結合在一起。
With high Strength, when an external force affects the liquid, it would either stretch out into tendrils, or split into large droplets.在較大的表面張力下,當外力影響液體時,它要么伸展成卷須,要么分裂成大液滴。
Which of these two effects will occur is controlled by the Droplet Breakup parameter. 這兩種效應中,產生哪種現象是由液滴破碎參數控制的。
For more information, see the Surface Tension example below.
Droplet Breakup | lqstdropbreak – Balances between the liquid forming tendrils or droplets.形成卷須或液滴的液體之間的平衡。
When set to a value of 0, the liquid forms long tendrils.當設置為0時,液體形成長卷須。
When set to a value of 1, the liquid breaks up into separate droplets, the size of which can be controlled by the Droplet Radius parameter.當設置為1時,液體會分裂成單獨的液滴,液滴的大小可以由液滴半徑參數控制。
For more information, see the Droplet Breakup example below.
Droplet Radius | lqstdroprad – Controls the radius of the droplets formed by the Droplet Breakup parameter, in voxels.控制由液滴破碎參數形成的液滴半徑,單位為體素。
This means that increasing the resolution of the Simulator will reduce the overall size of the droplets in your simulation.
!Increasing the Droplet Radius can dramatically slow the simulation down. Please use it with caution.增加液滴半徑可以顯著降低模擬速度。請小心使用。
使潤濕
!Simulation of wetting can be used in rendering for blending of wet and dry materials depending on which parts of a geometry have been in contact with the simulated liquid.潤濕模擬可用於渲染混合濕和干材料,這
Wetting can also change the behavior of simulated viscous liquid and make it stick to geometries.潤濕還可以改變模擬粘性液體的行為,使其粘着幾何形狀。
The wetting simulation produces a particle system called WetMap.潤濕模擬產生了一個名為WetMap的粒子系統。
It can be rendered using a Particle Texture | PhoenixFDParticleTex map which blends between a wet and a dry surface material.
The drying info is kept in the particle size channel.
To convert the map to grayscale, enable the Mult. by size option for the Particle Texture | PhoenixFDParticleTex map.
Wetting | wetting – Enables the wetting simulation. The liquid will leave a trail over the surfaces of bodies it interacts with.
Consumed Liquid | lq2wet – Controls how many liquid particles disappear when creating a single wetmap particle. The main purpose of this parameter is to prevent long visible tracks from being left by a single liquid particle. For more information, see the Consumed Liquid example below.
Drying Time (sec) | drying – Controls the drying speed in seconds. The WetMap particles are born with a size of 1, and if they are in an air environment, the size decreases until it reaches zero after the time specified with this parameter.
Sticky Liquid | wetdyn – This option produces a connecting force between the WetMap particles at the geometry surface and nearby liquid particles, when the liquid particles have at least a little Viscosity. For more information, see the Sticky Liquid example below.
!Geometry transforming or deforming at a high velocity may cause some or all of the Wetting particles stuck to it to disappear. To resolve this, dial up the Steps Per Frame parameter from the Dynamics tab of the Simulator.