# Time discretization

**URL:** <https://simpeg.discourse.group/t/time-discretization/47>\
**Category:** Electromagnetics\
**Created:** [January 16, 2020, 6:40pm UTC](https://simpeg.discourse.group/t/time-discretization/47 "2020-01-16T18:40:58Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![jcbarreto](https://yyz2.discourse-cdn.com/free1/user_avatar/simpeg.discourse.group/jcbarreto/32/108_2.png) [@jcbarreto](https://simpeg.discourse.group/u/jcbarreto)\
**Post date:** [January 16, 2020, 6:40pm UTC](https://simpeg.discourse.group/t/time-discretization/47/1 "2020-01-16T18:40:58Z")

</div>

How one should choose the time discretization where the problem will be evaluated?

---

<div class="post-metadata">

**Author:** ![lheagy](https://yyz2.discourse-cdn.com/free1/user_avatar/simpeg.discourse.group/lheagy/32/6_2.png) [@lheagy](https://simpeg.discourse.group/u/lheagy)\
**Post date:** [January 19, 2020, 6:06pm UTC](https://simpeg.discourse.group/t/time-discretization/47/2 "2020-01-19T18:06:03Z")

</div>

For time-domain EM problems, you will want to use a fine discretization where the fields are changing quickly (early in time – when the source is shut-off, either with a step-off function or if a waveform is used), and then you can slowly expand the time-stepping as the simulation runs because the fields change more slowly.

One thing to note in the computation, is that when solving the time-domain, each distinct time-step you use requires that the system matrix be re-factored. So if I used a time-mesh of

```auto
time_steps = [(1e-6, 10), (3e-6, 10), (1e-5, 10), (3e-5, 10), (1e-4, 10)]

```

then we will need 5 matrix factorizations. So it is a bit of a trade-off between the total number of time-steps needed and the number of factorizations.

A good test is to run a simulation over a half-space and check that the time-decay curves are smooth. For example, in this one [https://github.com/simpeg/em-notebooks/blob/master/notebooks/TDEM\_vmd\_sounding\_over\_sphere.ipynb](https://github.com/simpeg/em-notebooks/blob/master/notebooks/TDEM_vmd_sounding_over_sphere.ipynb), there is a slight kink in the half-space time decay at 2e-4ms, so we might want to go in and check if that is where the time-discretization changes and instead maybe take a couple more steps at a finer discretization.
