Initial conditions for LES simulation of decaying homogeneous isotropic turbulence

--------------------------------------
See www.stanford.edu/~hjbae/CBC for more details on how to use this code.
--------------------------------------


The dynamic Smagorinsky model needs a box-filtered initial condition, the QR LES model needs a spectral cut-off filtered initial condition

- You can skip 1 and 2 if you do not want to do a DNS.
- Set res to low values while testing (1 - 4). I set res to 10 for the paper to increase the resolution at the lowest wave numbers, but it is not very important. I guess that the fit will be more accurate (at low wave numbers) could be generated by changing the interpolation in energy.m and by making makespectrum.m consistent with the makefield.m (in how they assign energy to wave numbers). Because the filtered and fitted spectra are used the fitted 512^3 field to generate a 64^3 field, you would have to run step 1 again to improve this.
- The fields in the directories qr and dsm are Wybe-indexed. I think you can easily generate Jane-indexed fields by setting jnumb to 1 and repeating the steps 3 - 8. If the indexing is wrong the generated field is not divergence-free, and your method should signal this by a jump in the energy at t = 0.

1. run gen_ic_512 to generate a 512^3 initial condition (takes some time)
2. run gen_filt_exp to generate spectra of the box-filtered experimental data as reference data for a simulation with the dynamic Smagorinsky model
3a. run gen_ic_64_dsm to generate a filtered initial condition for the dynamic Smagorinsky model
3b. run gen_ic_64_qr to generate an initial condition for the qr model
4. run simulations with the both models from t' = 0 to t' = 42 with the initial conditions {dsm,qr}/CBC_64_{dsm,qr}_{U,V,W}.bin (~/stanford/eddy_lite_cbc_new/, {dsm,qr0}.kang.inp, parameters.kang), save fields to {dsm,qr}/CBC_64_{dsm,qr}_42_{U,V,W}.bin
5a. run kang_ic_64_dsm to Kang-rescale the solution at t' = 42 to a new initial condition for the dynamic Smagorinsky model
5b. run kang_ic_64_qr to Kang-rescale the solution at t' = 42 to a new initial condition for the qr model
6. run simulations with the both models from t' = 42 to t' = 191 with the initial condition {dsm,qr}/CBC_64_{dsm,qr}_42_kang_{U,V,W}.bin, save fields to {dsm,qr}/CBC_64_{dsm,qr}_{98,171}_{U,V,W}.bin
7a. run postproc_dsm to post-process the dsm data
7b. run postproc_qr to post-process the qr data
8. run plot_spectra to generate the data for the paper