Emacs: ox-spectacle as alternatives for presentation

lorniu wrote an org-mode export package for making a presentation. Here are some good things about this package: My dream to include videos was finally achieved The speed to compile the whole presentation is about one or two seconds It is very easy to use Some limitations: It requires an Internet connection The narrow function is not available right now Video file name is more strict, with no underscore I will consider making PPT my first choice in the future.

fist drag issue finally solved

After fixing the boundary condition and drag issue, the simulation is done and the drag history is shown in Fig. 1. The mean drag is very close. The y-axis is at the scale of \(10^5\), so there must be a unit conversion I was missing in the calculation. convertToMeters 1; should be used as convertToMeters 0.001; to do the unit conversion because the model is in a unit of a millimetre.

fist: compare two types of boundary conditions

I encountered this error this morning. 1 2 3 4 5 6 7 8 9 10 --> FOAM FATAL IO ERROR: inconsistent patch and patchField types for patch type symmetry and patchField type fixedValue file: $case/k/boundaryField/walls from line 37 to line 38. From function static Foam::tmp<Foam::fvPatchField<Type> > Foam::fvPatchField<Type>::New(const Foam::fvPatch&, const Foam::DimensionedField<Type, Foam::volMesh>&, const Foam::dictionary&) [with Type = double] in file $OF_INSTALL/openmpi4/openfoam/9/OpenFOAM-9/src/finiteVolume/lnInclude/fvPatchFieldNew.C at line 154. FOAM exiting The error suggests that there is something wrong with boundary condition settings.

fist: Calculating the projection area

To calculate projection area in ParaView, we need to use calculator to do projection first. An example can be found in Fig. 2. After that use IntegrateVariables filter to calculate the projection area, as shown in Fig. 1, but you need to devide the number by 2. Figure 1: To calculate the projection area, choose cell data. Figure 2: Setting in ParaView. In this case, flow is along the x-axis and we need to project the fist into yoz plane.

fist: negative drag issue fixed

After the boundary conditions were fixed, I got a new drag. However, the average drag is still negative. Reviewing the case setup, I found this: 1 dragDir (0 1 0); The drag direction was set to be in the y-direction. That’s the reason why is negative. After, fixing it, the drag should be in a positive value. Next, I will set up the projection area, the reference length, and the unit properly.

fist simulation: RAS turbulence model

The challenge for using simplified Navier Stokes equations is the new generated term: the correlation \(\overline{u_i^{\prime} u_j^{\prime}}\). Spalart and Allmaras (Spalart and Allmaras 1993) proposed that the above term should be governed by \(\overline{u_i u_j}=-2 \nu_t S_{i j}\). Following is what it looks: Kinematic Eddy Viscosity: \[ \nu_T=\tilde{\nu} f_{v 1} \] Eddy Viscosity Equation: \begin{aligned} & \frac{\partial \tilde{\nu}}{\partial t}+U_j \frac{\partial \tilde{\nu}}{\partial x_j}=c_{b 1} \tilde{S} \tilde{\nu}-c_{w 1} f_w\left(\frac{\tilde{\nu}}{d}\right)^2 \\ & +\frac{1}{\sigma} \frac{\partial}{\partial x_k}\left[(\nu+\tilde{\nu}) \frac{\partial \tilde{\nu}}{\partial x_k}\right]+\frac{c_{b 2}}{\sigma} \frac{\partial \tilde{\nu}}{\partial x_k} \frac{\partial \tilde{\nu}}{\partial x_k} \end{aligned}

FFPEG: Combining Four Videos as a Single Video

I analyze vortex structure a lot. In many cases, multiple viewports are necessary to fully appreciate the dynamics of these structures. I used to do it directly in ParaView, but it is not very robust. Today, I found this answer to solve my problem. 1 2 3 4 5 6 7 ffmpeg -i input0 -i input1 -i input2 -i input3 -filter_complex "[0]drawtext=text='vid0':fontsize=20:x=(w-text_w)/2:y=(h-text_h)/2[v0]; [1]drawtext=text='vid1':fontsize=20:x=(w-text_w)/2:y=(h-text_h)/2[v1]; [2]drawtext=text='vid2':fontsize=20:x=(w-text_w)/2:y=(h-text_h)/2[v2]; [3]drawtext=text='vid3':fontsize=20:x=(w-text_w)/2:y=(h-text_h)/2[v3]; [v0][v1][v2][v3]xstack=inputs=4:layout=0_0|w0_0|0_h0|w0_h0[v]" -map "[v]" output The only thing that I need to mention is that it is better to make the above command into a single-line command.