Blender  V3.3
Variables
fluid_script.h File Reference
#include <string>

Go to the source code of this file.

Variables

const std::string manta_import
 
const std::string manta_debuglevel
 
const std::string fluid_solver
 
const std::string fluid_solver_noise
 
const std::string fluid_solver_mesh
 
const std::string fluid_solver_particles
 
const std::string fluid_solver_guiding
 
const std::string fluid_solver_viscosity
 
const std::string fluid_variables
 
const std::string fluid_variables_noise
 
const std::string fluid_variables_mesh
 
const std::string fluid_variables_particles
 
const std::string fluid_variables_guiding
 
const std::string fluid_variables_viscosity
 
const std::string fluid_with_obstacle
 
const std::string fluid_with_guiding
 
const std::string fluid_with_fractions
 
const std::string fluid_with_invel
 
const std::string fluid_with_outflow
 
const std::string fluid_with_sndparts
 
const std::string fluid_time_stepping
 
const std::string fluid_adapt_time_step
 
const std::string fluid_alloc
 
const std::string fluid_alloc_obstacle
 
const std::string fluid_alloc_guiding
 
const std::string fluid_alloc_fractions
 
const std::string fluid_alloc_invel
 
const std::string fluid_alloc_outflow
 
const std::string fluid_pre_step
 
const std::string fluid_post_step
 
const std::string fluid_delete_all
 
const std::string fluid_cache_helper
 
const std::string fluid_bake_multiprocessing
 
const std::string fluid_bake_data
 
const std::string fluid_bake_noise
 
const std::string fluid_bake_mesh
 
const std::string fluid_bake_particles
 
const std::string fluid_bake_guiding
 
const std::string fluid_file_import
 
const std::string fluid_load_guiding
 
const std::string fluid_load_vel
 
const std::string fluid_file_export
 
const std::string fluid_save_guiding
 
const std::string fluid_standalone
 
const std::string header_libraries
 
const std::string header_main
 
const std::string header_prepost
 
const std::string header_steps
 
const std::string header_import
 
const std::string header_grids
 
const std::string header_solvers
 
const std::string header_variables
 
const std::string header_time
 
const std::string header_gridinit
 

Variable Documentation

◆ fluid_adapt_time_step

const std::string fluid_adapt_time_step
Initial value:
=
"\n\
def fluid_adapt_time_step_$ID$():\n\
mantaMsg('Fluid adapt time step')\n\
\n\
# time params are animatable\n\
s$ID$.frameLength = frameLength_s$ID$\n\
s$ID$.cfl = cflCond_s$ID$\n\
s$ID$.timestepMin = s$ID$.frameLength / max(1, timestepsMax_s$ID$)\n\
s$ID$.timestepMax = s$ID$.frameLength / max(1, timestepsMin_s$ID$)\n\
\n\
# ensure that vel grid is full (remember: adaptive domain can reallocate solver)\n\
copyRealToVec3(sourceX=x_vel_s$ID$, sourceY=y_vel_s$ID$, sourceZ=z_vel_s$ID$, target=vel_s$ID$)\n\
maxVel_s$ID$ = vel_s$ID$.getMax() if vel_s$ID$ else 0\n\
if using_adaptTime_s$ID$:\n\
mantaMsg('Adapt timestep, maxvel: ' + str(maxVel_s$ID$))\n\
s$ID$.adaptTimestep(maxVel_s$ID$)\n"

Definition at line 236 of file fluid_script.h.

Referenced by MANTA::exportLiquidScript(), and MANTA::exportSmokeScript().

◆ fluid_alloc

const std::string fluid_alloc
Initial value:
=
"\n\
mantaMsg('Fluid alloc data')\n\
flags_s$ID$ = s$ID$.create(FlagGrid, name='$NAME_FLAGS$')\n\
vel_s$ID$ = s$ID$.create(MACGrid, name='$NAME_VELOCITY$', sparse=True)\n\
velTmp_s$ID$ = s$ID$.create(MACGrid, name='$NAME_VELOCITYTMP$', sparse=True)\n\
x_vel_s$ID$ = s$ID$.create(RealGrid, name='$NAME_VELOCITY_X$')\n\
y_vel_s$ID$ = s$ID$.create(RealGrid, name='$NAME_VELOCITY_Y$')\n\
z_vel_s$ID$ = s$ID$.create(RealGrid, name='$NAME_VELOCITY_Z$')\n\
pressure_s$ID$ = s$ID$.create(RealGrid, name='$NAME_PRESSURE$')\n\
phiObs_s$ID$ = s$ID$.create(LevelsetGrid, name='$NAME_PHIOBS$')\n\
phiSIn_s$ID$ = s$ID$.create(LevelsetGrid, name='$NAME_PHISIN$') # helper for static flow objects\n\
phiIn_s$ID$ = s$ID$.create(LevelsetGrid, name='$NAME_PHIIN$')\n\
phiOut_s$ID$ = s$ID$.create(LevelsetGrid, name='$NAME_PHIOUT$')\n\
forces_s$ID$ = s$ID$.create(Vec3Grid, name='$NAME_FORCES$')\n\
x_force_s$ID$ = s$ID$.create(RealGrid, name='$NAME_FORCES_X$')\n\
y_force_s$ID$ = s$ID$.create(RealGrid, name='$NAME_FORCES_Y$')\n\
z_force_s$ID$ = s$ID$.create(RealGrid, name='$NAME_FORCES_Z$')\n\
obvel_s$ID$ = None\n\
\n\
# Set some initial values\n\
phiObs_s$ID$.setConst(9999)\n\
phiSIn_s$ID$.setConst(9999)\n\
phiIn_s$ID$.setConst(9999)\n\
phiOut_s$ID$.setConst(9999)\n\
\n\
# Keep track of important objects in dict to load them later on\n\
fluid_data_dict_final_s$ID$ = { 'vel' : vel_s$ID$ }\n\
fluid_data_dict_resume_s$ID$ = { 'phiObs' : phiObs_s$ID$, 'phiIn' : phiIn_s$ID$, 'phiOut' : phiOut_s$ID$, 'flags' : flags_s$ID$, 'velTmp' : velTmp_s$ID$ }\n"

Definition at line 258 of file fluid_script.h.

Referenced by MANTA::exportLiquidScript(), and MANTA::exportSmokeScript().

◆ fluid_alloc_fractions

const std::string fluid_alloc_fractions
Initial value:
=
"\n\
mantaMsg('Allocating fractions data')\n\
fractions_s$ID$ = s$ID$.create(MACGrid, name='$NAME_FRACTIONS$')\n"

Definition at line 325 of file fluid_script.h.

Referenced by MANTA::exportLiquidScript(), and MANTA::initFractions().

◆ fluid_alloc_guiding

const std::string fluid_alloc_guiding
Initial value:
=
"\n\
mantaMsg('Allocating guiding data')\n\
velT_s$ID$ = s$ID$.create(MACGrid, name='$NAME_VELT$')\n\
weightGuide_s$ID$ = s$ID$.create(RealGrid, name='$NAME_WEIGHTGUIDE$')\n\
numGuides_s$ID$ = s$ID$.create(RealGrid, name='$NAME_NUMGUIDES$')\n\
phiGuideIn_s$ID$ = s$ID$.create(LevelsetGrid, name='$NAME_PHIGUIDEIN$')\n\
guidevelC_s$ID$ = s$ID$.create(Vec3Grid, name='$NAME_GUIDEVELC$')\n\
x_guidevel_s$ID$ = s$ID$.create(RealGrid, name='$NAME_GUIDEVEL_X$')\n\
y_guidevel_s$ID$ = s$ID$.create(RealGrid, name='$NAME_GUIDEVEL_Y$')\n\
z_guidevel_s$ID$ = s$ID$.create(RealGrid, name='$NAME_GUIDEVEL_Z$')\n\
\n\
# Final guide vel grid needs to have independent size\n\
guidevel_sg$ID$ = sg$ID$.create(MACGrid, name='$NAME_VELOCITY_GUIDE$')\n\
\n\
# Keep track of important objects in dict to load them later on\n\
fluid_guiding_dict_s$ID$ = { 'guidevel' : guidevel_sg$ID$ }\n"

Definition at line 307 of file fluid_script.h.

Referenced by MANTA::exportLiquidScript(), MANTA::exportSmokeScript(), and MANTA::initGuiding().

◆ fluid_alloc_invel

const std::string fluid_alloc_invel
Initial value:
=
"\n\
mantaMsg('Allocating initial velocity data')\n\
invelC_s$ID$ = s$ID$.create(VecGrid, name='$NAME_INVELC$')\n\
x_invel_s$ID$ = s$ID$.create(RealGrid, name='$NAME_INVEL_X$')\n\
y_invel_s$ID$ = s$ID$.create(RealGrid, name='$NAME_INVEL_Y$')\n\
z_invel_s$ID$ = s$ID$.create(RealGrid, name='$NAME_INVEL_Z$')\n"

Definition at line 330 of file fluid_script.h.

Referenced by MANTA::exportLiquidScript(), MANTA::exportSmokeScript(), and MANTA::initInVelocity().

◆ fluid_alloc_obstacle

const std::string fluid_alloc_obstacle
Initial value:
=
"\n\
mantaMsg('Allocating obstacle data')\n\
numObs_s$ID$ = s$ID$.create(RealGrid, name='$NAME_NUMOBS$')\n\
phiObsSIn_s$ID$ = s$ID$.create(LevelsetGrid, name='$NAME_PHIOBSSIN$') # helper for static obstacle objects\n\
phiObsIn_s$ID$ = s$ID$.create(LevelsetGrid, name='$NAME_PHIOBSIN$')\n\
obvel_s$ID$ = s$ID$.create(MACGrid, name='$NAME_OBVEL$')\n\
obvelC_s$ID$ = s$ID$.create(Vec3Grid, name='$NAME_OBVELC$')\n\
x_obvel_s$ID$ = s$ID$.create(RealGrid, name='$NAME_OBVEL_X$')\n\
y_obvel_s$ID$ = s$ID$.create(RealGrid, name='$NAME_OBVEL_Y$')\n\
z_obvel_s$ID$ = s$ID$.create(RealGrid, name='$NAME_OBVEL_Z$')\n\
\n\
# Set some initial values\n\
phiObsSIn_s$ID$.setConst(9999)\n\
phiObsIn_s$ID$.setConst(9999)\n\
\n\
if 'fluid_data_dict_resume_s$ID$' in globals():\n\
fluid_data_dict_resume_s$ID$.update(phiObsIn=phiObsIn_s$ID$)\n"

Definition at line 288 of file fluid_script.h.

Referenced by MANTA::exportLiquidScript(), MANTA::exportSmokeScript(), and MANTA::initObstacle().

◆ fluid_alloc_outflow

const std::string fluid_alloc_outflow
Initial value:
=
"\n\
mantaMsg('Allocating outflow data')\n\
phiOutSIn_s$ID$ = s$ID$.create(LevelsetGrid, name='$NAME_PHIOUTSIN$') # helper for static outflow objects\n\
phiOutIn_s$ID$ = s$ID$.create(LevelsetGrid, name='$NAME_PHIOUTIN$')\n\
\n\
# Set some initial values\n\
phiOutSIn_s$ID$.setConst(9999)\n\
phiOutIn_s$ID$.setConst(9999)\n\
\n\
if 'fluid_data_dict_resume_s$ID$' in globals():\n\
fluid_data_dict_resume_s$ID$.update(phiOutIn=phiOutIn_s$ID$)\n"

Definition at line 338 of file fluid_script.h.

Referenced by MANTA::exportLiquidScript(), MANTA::exportSmokeScript(), and MANTA::initOutflow().

◆ fluid_bake_data

const std::string fluid_bake_data
Initial value:
=
"\n\
def bake_fluid_process_data_$ID$(framenr, format_data, path_data):\n\
mantaMsg('Bake fluid data')\n\
\n\
s$ID$.frame = framenr\n\
s$ID$.frameLength = frameLength_s$ID$\n\
s$ID$.timeTotal = timeTotal_s$ID$\n\
\n\
start_time = time.time()\n\
if using_smoke_s$ID$:\n\
smoke_adaptive_step_$ID$(framenr)\n\
if using_liquid_s$ID$:\n\
liquid_adaptive_step_$ID$(framenr)\n\
mantaMsg('--- Step: %s seconds ---' % (time.time() - start_time))\n\
\n\
def bake_fluid_data_$ID$(path_data, framenr, format_data):\n\
if not withMPBake or isWindows:\n\
bake_fluid_process_data_$ID$(framenr, format_data, path_data)\n\
else:\n\
fluid_cache_multiprocessing_start_$ID$(function=bake_fluid_process_data_$ID$, framenr=framenr, format_data=format_data, path_data=path_data, do_join=False)\n"

Definition at line 514 of file fluid_script.h.

◆ fluid_bake_guiding

const std::string fluid_bake_guiding
Initial value:
=
"\n\
def bake_guiding_process_$ID$(framenr, format_guiding, path_guiding, resumable):\n\
mantaMsg('Bake fluid guiding')\n\
\n\
# Average out velocities from multiple guiding objects at one cell\n\
x_guidevel_s$ID$.safeDivide(numGuides_s$ID$)\n\
y_guidevel_s$ID$.safeDivide(numGuides_s$ID$)\n\
z_guidevel_s$ID$.safeDivide(numGuides_s$ID$)\n\
copyRealToVec3(sourceX=x_guidevel_s$ID$, sourceY=y_guidevel_s$ID$, sourceZ=z_guidevel_s$ID$, target=guidevelC_s$ID$)\n\
\n\
mantaMsg('Extrapolating guiding velocity')\n\
# ensure velocities inside of guiding object, slightly add guiding vels outside of object too\n\
extrapolateVec3Simple(vel=guidevelC_s$ID$, phi=phiGuideIn_s$ID$, distance=6, inside=True)\n\
extrapolateVec3Simple(vel=guidevelC_s$ID$, phi=phiGuideIn_s$ID$, distance=3, inside=False)\n\
resampleVec3ToMac(source=guidevelC_s$ID$, target=guidevel_sg$ID$)\n\
\n\
fluid_save_guiding_$ID$(path_guiding, framenr, format_guiding, resumable)\n\
\n\
def bake_guiding_$ID$(path_guiding, framenr, format_guiding, resumable):\n\
if not withMPBake or isWindows:\n\
bake_guiding_process_$ID$(framenr, format_guiding, path_guiding, resumable)\n\
else:\n\
fluid_cache_multiprocessing_start_$ID$(function=bake_guiding_process_$ID$, framenr=framenr, format_guiding=format_guiding, path_guiding=path_guiding, resumable=resumable)\n"

Definition at line 600 of file fluid_script.h.

◆ fluid_bake_mesh

const std::string fluid_bake_mesh
Initial value:
=
"\n\
def bake_mesh_process_$ID$(framenr, format_data, format_mesh, path_mesh):\n\
mantaMsg('Bake fluid mesh')\n\
\n\
sm$ID$.frame = framenr\n\
sm$ID$.frameLength = frameLength_s$ID$\n\
sm$ID$.timeTotal = timeTotal_s$ID$\n\
sm$ID$.timestep = frameLength_s$ID$ # no adaptive timestep for mesh\n\
\n\
#if using_smoke_s$ID$:\n\
# TODO(sebbas): Future update could include smoke mesh (vortex sheets)\n\
if using_liquid_s$ID$:\n\
liquid_step_mesh_$ID$()\n\
liquid_save_mesh_$ID$(path_mesh, framenr, format_mesh)\n\
if using_speedvectors_s$ID$:\n\
liquid_save_meshvel_$ID$(path_mesh, framenr, format_data)\n\
\n\
def bake_mesh_$ID$(path_mesh, framenr, format_data, format_mesh):\n\
if not withMPBake or isWindows:\n\
bake_mesh_process_$ID$(framenr, format_data, format_mesh, path_mesh)\n\
else:\n\
fluid_cache_multiprocessing_start_$ID$(function=bake_mesh_process_$ID$, framenr=framenr, format_data=format_data, format_mesh=format_mesh, path_mesh=path_mesh)\n"

Definition at line 554 of file fluid_script.h.

◆ fluid_bake_multiprocessing

const std::string fluid_bake_multiprocessing

Definition at line 478 of file fluid_script.h.

◆ fluid_bake_noise

const std::string fluid_bake_noise
Initial value:
=
"\n\
def bake_noise_process_$ID$(framenr, format_noise, path_noise):\n\
mantaMsg('Bake fluid noise')\n\
\n\
sn$ID$.frame = framenr\n\
sn$ID$.frameLength = frameLength_s$ID$\n\
sn$ID$.timeTotal = timeTotal_s$ID$\n\
sn$ID$.timestep = frameLength_s$ID$ # no adaptive timestep for noise\n\
\n\
smoke_step_noise_$ID$(framenr)\n\
\n\
def bake_noise_$ID$(path_noise, framenr, format_noise):\n\
if not withMPBake or isWindows:\n\
bake_noise_process_$ID$(framenr, format_noise, path_noise)\n\
else:\n\
fluid_cache_multiprocessing_start_$ID$(function=bake_noise_process_$ID$, framenr=framenr, format_noise=format_noise, path_noise=path_noise)\n"

Definition at line 536 of file fluid_script.h.

◆ fluid_bake_particles

const std::string fluid_bake_particles
Initial value:
=
"\n\
def bake_particles_process_$ID$(framenr, format_particles, path_particles, resumable):\n\
mantaMsg('Bake secondary particles')\n\
\n\
sp$ID$.frame = framenr\n\
sp$ID$.frameLength = frameLength_s$ID$\n\
sp$ID$.timeTotal = timeTotal_s$ID$\n\
sp$ID$.timestep = frameLength_s$ID$ # no adaptive timestep for particles\n\
\n\
#if using_smoke_s$ID$:\n\
# TODO(sebbas): Future update could include smoke particles (e.g. fire sparks)\n\
if using_liquid_s$ID$:\n\
liquid_step_particles_$ID$()\n\
liquid_save_particles_$ID$(path_particles, framenr, format_particles, resumable)\n\
\n\
def bake_particles_$ID$(path_particles, framenr, format_particles, resumable):\n\
if not withMPBake or isWindows:\n\
bake_particles_process_$ID$(framenr, format_particles, path_particles, resumable)\n\
else:\n\
fluid_cache_multiprocessing_start_$ID$(function=bake_particles_process_$ID$, framenr=framenr, format_particles=format_particles, path_particles=path_particles, resumable=resumable)\n"

Definition at line 578 of file fluid_script.h.

◆ fluid_cache_helper

const std::string fluid_cache_helper
Initial value:
=
"\n\
def fluid_cache_get_framenr_formatted_$ID$(framenr):\n\
return str(framenr).zfill(4) if framenr >= 0 else str(framenr).zfill(5)\n"

Definition at line 473 of file fluid_script.h.

Referenced by MANTA::exportLiquidScript(), and MANTA::exportSmokeScript().

◆ fluid_delete_all

const std::string fluid_delete_all

Definition at line 408 of file fluid_script.h.

Referenced by MANTA::~MANTA().

◆ fluid_file_export

const std::string fluid_file_export

Definition at line 682 of file fluid_script.h.

◆ fluid_file_import

const std::string fluid_file_import

Definition at line 629 of file fluid_script.h.

Referenced by MANTA::exportLiquidScript(), and MANTA::exportSmokeScript().

◆ fluid_load_guiding

const std::string fluid_load_guiding
Initial value:
=
"\n\
def fluid_load_guiding_$ID$(path, framenr, file_format):\n\
mantaMsg('Fluid load guiding, frame ' + str(framenr))\n\
guidevel_sg$ID$.setName('$NAME_VELOCITY_GUIDE$')\n\
fluid_file_import_s$ID$(dict=fluid_guiding_dict_s$ID$, path=path, framenr=framenr, file_format=file_format, file_name=file_guiding_s$ID$)\n\
\n\
copyVec3ToReal(source=guidevel_sg$ID$, targetX=x_guidevel_s$ID$, targetY=y_guidevel_s$ID$, targetZ=z_guidevel_s$ID$)\n"

Definition at line 661 of file fluid_script.h.

Referenced by MANTA::exportLiquidScript(), MANTA::exportSmokeScript(), and MANTA::initGuiding().

◆ fluid_load_vel

const std::string fluid_load_vel
Initial value:
=
"\n\
def fluid_load_vel_$ID$(path, framenr, file_format):\n\
mantaMsg('Fluid load vel, frame ' + str(framenr))\n\
guidevel_sg$ID$.setName('$NAME_VELOCITY$') # for loading data the guidevel grid will pretend to be the vel grid\n\
fluid_vel_dict_s$ID$ = { 'vel' : guidevel_sg$ID$ }\n\
fluid_file_import_s$ID$(dict=fluid_vel_dict_s$ID$, path=path, framenr=framenr, file_format=file_format, file_name=file_data_s$ID$)\n"

Definition at line 670 of file fluid_script.h.

Referenced by MANTA::initGuiding().

◆ fluid_post_step

const std::string fluid_post_step
Initial value:
=
"\n\
def fluid_post_step_$ID$():\n\
mantaMsg('Fluid post step')\n\
\n\
# Copy vel grid to reals grids (which Blender internal will in turn use for vel access)\n\
copyVec3ToReal(source=vel_s$ID$, targetX=x_vel_s$ID$, targetY=y_vel_s$ID$, targetZ=z_vel_s$ID$)\n\
if using_guiding_s$ID$:\n\
copyVec3ToReal(source=guidevel_sg$ID$, targetX=x_guidevel_s$ID$, targetY=y_guidevel_s$ID$, targetZ=z_guidevel_s$ID$)\n"

Definition at line 394 of file fluid_script.h.

Referenced by MANTA::exportLiquidScript(), and MANTA::exportSmokeScript().

◆ fluid_pre_step

const std::string fluid_pre_step

Definition at line 355 of file fluid_script.h.

Referenced by MANTA::exportLiquidScript(), and MANTA::exportSmokeScript().

◆ fluid_save_guiding

const std::string fluid_save_guiding
Initial value:
=
"\n\
def fluid_save_guiding_$ID$(path, framenr, file_format, resumable):\n\
mantaMsg('Fluid save guiding, frame ' + str(framenr))\n\
dict = fluid_guiding_dict_s$ID$\n\
if not withMPSave or isWindows:\n\
fluid_file_export_s$ID$(dict=dict, framenr=framenr, file_format=file_format, path=path, file_name=file_guiding_s$ID$)\n\
else:\n\
fluid_cache_multiprocessing_start_$ID$(function=fluid_file_export_s$ID$, file_name=file_guiding_s$ID$, framenr=framenr, format_data=file_format, path_data=path, dict=dict, do_join=False)\n"

Definition at line 715 of file fluid_script.h.

Referenced by MANTA::initGuiding().

◆ fluid_solver

const std::string fluid_solver
Initial value:
=
"\n\
mantaMsg('Solver base')\n\
s$ID$ = Solver(name='solver_base$ID$', gridSize=gs_s$ID$, dim=dim_s$ID$)\n"

Definition at line 42 of file fluid_script.h.

Referenced by MANTA::exportLiquidScript(), and MANTA::exportSmokeScript().

◆ fluid_solver_guiding

const std::string fluid_solver_guiding
Initial value:
=
"\n\
mantaMsg('Solver guiding')\n\
sg$ID$ = Solver(name='solver_guiding$ID$', gridSize=gs_sg$ID$)\n"

Definition at line 62 of file fluid_script.h.

Referenced by MANTA::exportLiquidScript(), MANTA::exportSmokeScript(), and MANTA::initGuiding().

◆ fluid_solver_mesh

const std::string fluid_solver_mesh
Initial value:
=
"\n\
mantaMsg('Solver mesh')\n\
sm$ID$ = Solver(name='solver_mesh$ID$', gridSize=gs_sm$ID$)\n"

Definition at line 52 of file fluid_script.h.

Referenced by MANTA::exportLiquidScript().

◆ fluid_solver_noise

const std::string fluid_solver_noise
Initial value:
=
"\n\
mantaMsg('Solver noise')\n\
sn$ID$ = Solver(name='solver_noise$ID$', gridSize=gs_sn$ID$)\n"

Definition at line 47 of file fluid_script.h.

Referenced by MANTA::exportSmokeScript().

◆ fluid_solver_particles

const std::string fluid_solver_particles
Initial value:
=
"\n\
mantaMsg('Solver particles')\n\
sp$ID$ = Solver(name='solver_particles$ID$', gridSize=gs_sp$ID$)\n"

Definition at line 57 of file fluid_script.h.

Referenced by MANTA::exportLiquidScript(), and MANTA::initSndParts().

◆ fluid_solver_viscosity

const std::string fluid_solver_viscosity
Initial value:
=
"\n\
mantaMsg('Solver viscosity')\n\
sv$ID$ = Solver(name='solver_viscosity$ID$', gridSize=gs_sv$ID$, dim=dim_s$ID$)\n"

Definition at line 67 of file fluid_script.h.

Referenced by MANTA::exportLiquidScript(), and MANTA::initLiquidViscosity().

◆ fluid_standalone

const std::string fluid_standalone

Definition at line 729 of file fluid_script.h.

Referenced by MANTA::exportLiquidScript(), and MANTA::exportSmokeScript().

◆ fluid_time_stepping

const std::string fluid_time_stepping
Initial value:
=
"\n\
mantaMsg('Fluid adaptive time stepping')\n\
s$ID$.frameLength = frameLength_s$ID$\n\
s$ID$.timestepMin = s$ID$.frameLength / max(1, timestepsMax_s$ID$)\n\
s$ID$.timestepMax = s$ID$.frameLength / max(1, timestepsMin_s$ID$)\n\
s$ID$.cfl = cflCond_s$ID$\n\
s$ID$.timePerFrame = timePerFrame_s$ID$\n\
s$ID$.timestep = dt0_s$ID$\n\
s$ID$.timeTotal = timeTotal_s$ID$\n\
#mantaMsg('timestep: ' + str(s$ID$.timestep) + ' // timPerFrame: ' + str(s$ID$.timePerFrame) + ' // frameLength: ' + str(s$ID$.frameLength) + ' // timeTotal: ' + str(s$ID$.timeTotal) )\n"

Definition at line 224 of file fluid_script.h.

Referenced by MANTA::exportLiquidScript(), and MANTA::exportSmokeScript().

◆ fluid_variables

const std::string fluid_variables

◆ fluid_variables_guiding

const std::string fluid_variables_guiding
Initial value:
=
"\n\
mantaMsg('Fluid variables guiding')\n\
gs_sg$ID$ = vec3($GUIDING_RESX$, $GUIDING_RESY$, $GUIDING_RESZ$)\n\
\n\
alpha_sg$ID$ = $GUIDING_ALPHA$\n\
beta_sg$ID$ = $GUIDING_BETA$\n\
gamma_sg$ID$ = $GUIDING_FACTOR$\n\
tau_sg$ID$ = 1.0\n\
sigma_sg$ID$ = 0.99/tau_sg$ID$\n\
theta_sg$ID$ = 1.0\n"

Definition at line 180 of file fluid_script.h.

Referenced by MANTA::exportLiquidScript(), MANTA::exportSmokeScript(), MANTA::initGuiding(), and MANTA::updateVariables().

◆ fluid_variables_mesh

const std::string fluid_variables_mesh
Initial value:
=
"\n\
mantaMsg('Fluid variables mesh')\n\
upres_sm$ID$ = $MESH_SCALE$\n\
gs_sm$ID$ = vec3(upres_sm$ID$*gs_s$ID$.x, upres_sm$ID$*gs_s$ID$.y, upres_sm$ID$*gs_s$ID$.z)\n"

Definition at line 168 of file fluid_script.h.

Referenced by MANTA::exportLiquidScript(), and MANTA::updateVariables().

◆ fluid_variables_noise

const std::string fluid_variables_noise
Initial value:
=
"\n\
mantaMsg('Fluid variables noise')\n\
upres_sn$ID$ = $NOISE_SCALE$\n\
gs_sn$ID$ = vec3(upres_sn$ID$*gs_s$ID$.x, upres_sn$ID$*gs_s$ID$.y, upres_sn$ID$*gs_s$ID$.z)\n"

Definition at line 162 of file fluid_script.h.

Referenced by MANTA::exportSmokeScript(), and MANTA::updateVariables().

◆ fluid_variables_particles

const std::string fluid_variables_particles
Initial value:
=
"\n\
mantaMsg('Fluid variables particles')\n\
upres_sp$ID$ = $PARTICLE_SCALE$\n\
gs_sp$ID$ = vec3(upres_sp$ID$*gs_s$ID$.x, upres_sp$ID$*gs_s$ID$.y, upres_sp$ID$*gs_s$ID$.z)\n"

Definition at line 174 of file fluid_script.h.

Referenced by MANTA::exportLiquidScript(), MANTA::initSndParts(), and MANTA::updateVariables().

◆ fluid_variables_viscosity

const std::string fluid_variables_viscosity
Initial value:
=
"\n\
gs_sv$ID$ = vec3($RESX$*2, $RESY$*2, $RESZ$*2)\n"

Definition at line 192 of file fluid_script.h.

Referenced by MANTA::exportLiquidScript(), and MANTA::initLiquidViscosity().

◆ fluid_with_fractions

const std::string fluid_with_fractions
Initial value:
=
"\n\
using_fractions_s$ID$ = True\n"

Definition at line 204 of file fluid_script.h.

Referenced by MANTA::initFractions().

◆ fluid_with_guiding

const std::string fluid_with_guiding
Initial value:
=
"\n\
using_guiding_s$ID$ = True\n"

Definition at line 200 of file fluid_script.h.

◆ fluid_with_invel

const std::string fluid_with_invel
Initial value:
=
"\n\
using_invel_s$ID$ = True\n"

Definition at line 208 of file fluid_script.h.

Referenced by MANTA::initInVelocity().

◆ fluid_with_obstacle

const std::string fluid_with_obstacle
Initial value:
=
"\n\
using_obstacle_s$ID$ = True\n"

Definition at line 196 of file fluid_script.h.

Referenced by MANTA::initObstacle().

◆ fluid_with_outflow

const std::string fluid_with_outflow
Initial value:
=
"\n\
using_outflow_s$ID$ = True\n"

Definition at line 212 of file fluid_script.h.

Referenced by MANTA::initOutflow().

◆ fluid_with_sndparts

const std::string fluid_with_sndparts
Initial value:
=
"\n\
using_sndparts_s$ID$ = True\n"

Definition at line 216 of file fluid_script.h.

Referenced by MANTA::initLiquidSndParts().

◆ header_gridinit

const std::string header_gridinit
Initial value:
=
"\n\
######################################################################\n\
## DOMAIN INIT\n\
######################################################################\n"

Definition at line 823 of file fluid_script.h.

Referenced by MANTA::exportLiquidScript().

◆ header_grids

const std::string header_grids
Initial value:
=
"\n\
######################################################################\n\
## GRIDS\n\
######################################################################\n"

Definition at line 799 of file fluid_script.h.

Referenced by MANTA::exportLiquidScript(), and MANTA::exportSmokeScript().

◆ header_import

const std::string header_import
Initial value:
=
"\n\
######################################################################\n\
## IMPORT\n\
######################################################################\n"

Definition at line 793 of file fluid_script.h.

Referenced by MANTA::exportLiquidScript(), and MANTA::exportSmokeScript().

◆ header_libraries

const std::string header_libraries
Initial value:
=
"\n\
######################################################################\n\
## LIBRARIES\n\
######################################################################\n"

Definition at line 769 of file fluid_script.h.

Referenced by MANTA::exportLiquidScript(), and MANTA::exportSmokeScript().

◆ header_main

const std::string header_main
Initial value:
=
"\n\
######################################################################\n\
## MAIN\n\
######################################################################\n"

Definition at line 775 of file fluid_script.h.

Referenced by MANTA::exportLiquidScript(), and MANTA::exportSmokeScript().

◆ header_prepost

const std::string header_prepost
Initial value:
=
"\n\
######################################################################\n\
## PRE/POST STEPS\n\
######################################################################\n"

Definition at line 781 of file fluid_script.h.

Referenced by MANTA::exportLiquidScript(), and MANTA::exportSmokeScript().

◆ header_solvers

const std::string header_solvers
Initial value:
=
"\n\
######################################################################\n\
## SOLVERS\n\
######################################################################\n"

Definition at line 805 of file fluid_script.h.

Referenced by MANTA::exportLiquidScript(), and MANTA::exportSmokeScript().

◆ header_steps

const std::string header_steps
Initial value:
=
"\n\
######################################################################\n\
## STEPS\n\
######################################################################\n"

Definition at line 787 of file fluid_script.h.

Referenced by MANTA::exportLiquidScript(), and MANTA::exportSmokeScript().

◆ header_time

const std::string header_time
Initial value:
=
"\n\
######################################################################\n\
## ADAPTIVE TIME\n\
######################################################################\n"

Definition at line 817 of file fluid_script.h.

Referenced by MANTA::exportLiquidScript(), and MANTA::exportSmokeScript().

◆ header_variables

const std::string header_variables
Initial value:
=
"\n\
######################################################################\n\
## VARIABLES\n\
######################################################################\n"

Definition at line 811 of file fluid_script.h.

Referenced by MANTA::exportLiquidScript(), and MANTA::exportSmokeScript().

◆ manta_debuglevel

const std::string manta_debuglevel
Initial value:
=
"\n\
def set_manta_debuglevel(level):\n\
setDebugLevel(level=level)\n # level 0 = mute all output from manta\n"

Definition at line 33 of file fluid_script.h.

◆ manta_import

const std::string manta_import
Initial value:
=
"\
from manta import *\n\
from math import inf\n\
import os.path, shutil, math, sys, gc, multiprocessing, platform, time\n\
\n\
withMPBake = False # Bake files asynchronously\n\
withMPSave = False # Save files asynchronously\n\
isWindows = platform.system() != 'Darwin' and platform.system() != 'Linux'\n\
# TODO(sebbas): Use this to simulate Windows multiprocessing (has default mode spawn)\n\
#try:\n\
# multiprocessing.set_start_method('spawn')\n\
#except:\n\
# pass\n"

Definition at line 14 of file fluid_script.h.

Referenced by MANTA::exportLiquidScript(), MANTA::exportSmokeScript(), and MANTA::~MANTA().