This topic has been discussed several times in the mailing list (i.e. how to configure the communication range). Search the
It is partly related to the YansWifiPhy attributes as those you have put here, as well as the propagation loss model that you consider, the data rate, and the packet size.
All these parameters affect the communication range so e.g. there is no exact value for TxPower to get e.g. 400m. It will depend on others.
Regards,
K.