diff options
Diffstat (limited to 'intern')
-rw-r--r-- | intern/mantaflow/intern/MANTA_main.cpp | 2 | ||||
-rw-r--r-- | intern/mantaflow/intern/strings/fluid_script.h | 1 | ||||
-rw-r--r-- | intern/mantaflow/intern/strings/liquid_script.h | 4 |
3 files changed, 5 insertions, 2 deletions
diff --git a/intern/mantaflow/intern/MANTA_main.cpp b/intern/mantaflow/intern/MANTA_main.cpp index 4759888e234..37d92de155e 100644 --- a/intern/mantaflow/intern/MANTA_main.cpp +++ b/intern/mantaflow/intern/MANTA_main.cpp @@ -981,6 +981,8 @@ std::string MANTA::getRealValue(const std::string &varName, FluidModifierData *m ss << (mmd->domain->flags & FLUID_DOMAIN_USE_FRACTIONS ? "True" : "False"); else if (varName == "DELETE_IN_OBSTACLE") ss << (mmd->domain->flags & FLUID_DOMAIN_DELETE_IN_OBSTACLE ? "True" : "False"); + else if (varName == "USING_DIFFUSION") + ss << (mmd->domain->flags & FLUID_DOMAIN_USE_DIFFUSION ? "True" : "False"); else std::cout << "ERROR: Unknown option: " << varName << std::endl; return ss.str(); diff --git a/intern/mantaflow/intern/strings/fluid_script.h b/intern/mantaflow/intern/strings/fluid_script.h index abfc1eff566..c442dd56c09 100644 --- a/intern/mantaflow/intern/strings/fluid_script.h +++ b/intern/mantaflow/intern/strings/fluid_script.h @@ -112,6 +112,7 @@ using_invel_s$ID$ = $USING_INVEL$\n\ using_outflow_s$ID$ = $USING_OUTFLOW$\n\ using_sndparts_s$ID$ = $USING_SNDPARTS$\n\ using_speedvectors_s$ID$ = $USING_SPEEDVECTORS$\n\ +using_diffusion_s$ID$ = $USING_DIFFUSION$\n\ \n\ # Fluid time params\n\ timeTotal_s$ID$ = $TIME_TOTAL$\n\ diff --git a/intern/mantaflow/intern/strings/liquid_script.h b/intern/mantaflow/intern/strings/liquid_script.h index d3ab4db954c..011b8c4cb1a 100644 --- a/intern/mantaflow/intern/strings/liquid_script.h +++ b/intern/mantaflow/intern/strings/liquid_script.h @@ -266,14 +266,14 @@ def liquid_step_$ID$():\n\ if using_obstacle_s$ID$:\n\ mantaMsg('Extrapolating object velocity')\n\ # ensure velocities inside of obs object, slightly add obvels outside of obs object\n\ - extrapolateVec3Simple(vel=obvelC_s$ID$, phi=phiObsIn_s$ID$, distance=int(res_s$ID$/2), inside=True)\n\ + extrapolateVec3Simple(vel=obvelC_s$ID$, phi=phiObsIn_s$ID$, distance=6, inside=True)\n\ extrapolateVec3Simple(vel=obvelC_s$ID$, phi=phiObsIn_s$ID$, distance=3, inside=False)\n\ resampleVec3ToMac(source=obvelC_s$ID$, target=obvel_s$ID$)\n\ \n\ extrapolateMACSimple(flags=flags_s$ID$, vel=vel_s$ID$, distance=2, intoObs=True if using_fractions_s$ID$ else False)\n\ \n\ # vel diffusion / viscosity!\n\ - if viscosity_s$ID$ > 0.:\n\ + if using_diffusion_s$ID$:\n\ mantaMsg('Viscosity')\n\ # diffusion param for solve = const * dt / dx^2\n\ alphaV = viscosity_s$ID$ * s$ID$.timestep * float(res_s$ID$*res_s$ID$)\n\ |