# 2. Simulation Adjustments Now that we have added the body, we should do some updates to the simulation setup to better accommodate it. ## Mesh and refinements With the body, it is important to add more refinement near its walls and also downstream, to capture its wake in a more adequate manner. For this we add two refinements: a buffer box around the body and a body refinement that follows its surface. For the flow near the body, we add a buffer layer, that has a target of {pv}`0.8 m` and a maximum of {pv}`1.2 m` of resolution. We will use a box from ({pv}`-50 m`, {pv}`-30 m`, {pv}`0 m`) to ({pv}`100 m`, {pv}`30 m`, {pv}`40 m`). This allows a smooth transition between the ABL and the body refinement. ```{eval-rst} .. figure:: /_static/img/workshops/simulating-bodies-in-abl/03-ref-buffer-form.png :align: center The buffer refinement form, resolving to :math:`0.63\,\text{m}` cells (level 4). ``` We also add a body refinement, to better capture near-wall effects and complexities. For this we add a body refinement for the building, targeting {pv}`0.3 m` and having at most {pv}`0.5 m` of resolution. For the inner thickness we multiply the target by -5, yielding {pv}`-1.5 m`, and for the outer one we multiply it by 20, yielding {pv}`6 m`. ```{eval-rst} .. figure:: /_static/img/workshops/simulating-bodies-in-abl/03-ref-body-form.png :align: center The body refinement form, resolving to :math:`0.31\,\text{m}` cells (level 5), with the thickness going from :math:`-1.5\,\text{m}` inside the body to :math:`6\,\text{m}` outside it. ``` With that we can update our mesh, which now has ~41M nodes. ```{eval-rst} .. figure:: /_static/img/workshops/simulating-bodies-in-abl/03-mesh-view.png :align: center The three refinements in the case - ABL, buffer and building - and the resulting mesh of 41.55M nodes. ``` ## Simulation time For the simulation time, with the profile we prescribed before (CAT 2 with {pv}`5 m/s` at {pv}`3 m`) we have about {pv}`7.5 m/s` at {pv}`25 m`. Updating the CTS calculation with $L = 20\,\text{m}$ (the building's smallest side) and $U = 7.5\,\text{m/s}$ yields a convective time scale of {pv}`2.66 s`. For this case we will use 500 CTS, yielding ~{pv}`1300 s` of sampling time. The FTT is {pv}`1500 m` / {pv}`7.5 m/s` = {pv}`200 s`, so the development time could be reduced to {pv}`400 s` (2 FTT). We keep {pv}`-600 s` here to stay conservative. So the simulation time now runs from {pv}`-600 s` to {pv}`1300 s`. ```{eval-rst} .. figure:: /_static/img/workshops/simulating-bodies-in-abl/03-parameters-form.png :align: center The parameters form with the new time window, and the diagnostics reporting the CTS for the building. The expected runtime is about 3h13 at the default 500 MLUPS. ``` To make this whole process easier, we could also change the inflow profile reference height and target velocity. Usually these values are chosen considering the reference geometry that will later be added to the domain. For the ABL case we used values common in pedestrian comfort studies, at house heights and everyday velocities. ## Pressure in walls export It is also common to check the pressure coefficient in structures. For this, we will add two exports: one point of reference for atmospheric pressure, and a body export. The point is placed right above the structure, high enough not to be affected by its dynamics, so that it captures only the atmospheric pressure waves. For this case we will add a point at ({pv}`0 m`, {pv}`0 m`, {pv}`150 m`) and make it export the pressure field with {pv}`0.1 s` of period after {pv}`0 s`. ```{eval-rst} .. figure:: /_static/img/workshops/simulating-bodies-in-abl/03-point-pressure.png :align: center The reference point export, sampling pressure every :math:`0.1\,\text{s}`. ``` For the body, we will add a body export. It's very important to use the same sampling period as the point, and also to set the normal offset. The recommended offset is 2 times the body resolution, so {pv}`0.62 m` for the {pv}`0.31 m` cells here. ```{note} This is because IBM has a diffusive layer that affects the pressure measurement if we measure right at the body position, so the probes should not sit in this region. The diffusive layer spans about 1.5 nodes, so an offset of 2 cells places the probes outside it. ``` ```{eval-rst} .. figure:: /_static/img/workshops/simulating-bodies-in-abl/03-building-pressure.png :align: center The body pressure export, with the :math:`0.62\,\text{m}` normal offset and 13.3k probes, one per surface triangle. ``` With this we should have all the exports of the case set up. ```{eval-rst} .. figure:: /_static/img/workshops/simulating-bodies-in-abl/03-exports-view.png :align: center The exports inherited from the ABL case plus the two pressure ones, and the probes of the body export around the building. ``` ```{seealso} * {doc}`Pressure Coefficient Measurement <../../guidelines/pressure-coefficient-measurement>` - the $c_p$ definition and how the two exports feed it. * {doc}`Geometry Representation with IBM <../../reference/body-discretization>` - the diffusive layer and why the probes are offset from the surface. ``` ## Next steps Now we have updated everything we need to run the simulation. To run it and monitor it we can follow the [same steps](../first-abl-simulation/06-running.md) that we did in the ABL workshop, and then move on to the [results](03-results.md).