Tue said:
When digging in a unit is there a formula behind which entrenchment level it reaches?
Yes, but only Norm knows for sure what the exact parameters and ranges are.
Some guidelines though, based on a few games and casual observations...
When initially digging in from any of the mobile, or reserve deployment modes, you will go at least to defending mode. Your unit will be more likely to go directly to entrenched mode, from mobile (or directly from defending to fortified) given an already high entrenchment level for the hex, and/or the presence of equipment in the hex which have engineering capability.
I believe that the base probability of being able to make these two state jumps is directly proportional to the entrenchment level of the hex, but there seem to be some modifications to this. Positive mods seem to be total engineering assets in the hex. Negative mods seem to be size of the unit, based on the scale of the hex. I cannot accurately quantify either, though...
Unit proficiency may also play a role, but I haven't seen enough evidence to support that view.
Tue said:
And does it increase over time or do I have to order it to dig in every turn to reach fortified status?
You'll have to order it to dig in each turn.