Is she yelling because she is 'trying out' a new tool or is she having a tantrum - she has completely lost control of herself and is screaming?
It matters because for the first - you give her better tools. So - 'Use your inside voice' and 'I can't hear you when you are yelling' are appropriate - so long as they are followed by modelling of what you do want. At 2, I would rephrase with my son. It would look like DS - screaming, me 'DS, let's try that again 'mommy, may I please have X' - ok, her is X' .
If she can't have what she is screaming for then I find rephrasing to just be frustrating (think about if your boss wanted you to rewrite your request for a raise with better reasoning when he/she was going to deny it no matter what, yuck). In that case - I would empathize with DS and help him express his feelings in words. 'Wow, you are mad/sad/frustrated that we can't do X now, it would be fun to do X now, but we need to do Y first before we can do X.'
If she has completely lost it - there is no point whatsoever in 'consequences' in my mind. All you teach her is that when she has big feelings that she has not learned how to manage - you don't love her. After all (in a toddler's mind) - why else would you banish her? Learning does NOT take place during tantrums - you have missed the teaching moment.
Instead - I would try time ins. This means being with her until the tantrum is over - some children would rather be held during the storm and some would not, but you can still be present. When it is over, then you can discuss whatever the inciting cause was (if either of you actually remember it).
I think the concept that 'you can never give in' is be very wrong and counter productive. It teaches a child to be stubborn, never give in and does NOT teach them the skills that they need to learn to get their needs met - reasoning and negotiation.
Also - what B says about triggers. Being hungry and tired make children (and adults) much more likely to lose control.
Another thing that helps is saying yes as often as possible. Toddlers hear no all the time and have very little control over the environment. So - if it doesn't matter to you - say yes. So - 'yes, we can play outside, just as soon as we clean up the crayons (after rephrasing this from a loud - mommy - outside now - to a normal volume -mommy, can we please go play outside?) works so so much better than - no, we can't play outside. We have to clean up the crayons.