Hello and welcome to JustAnswer BMW,My name is Steve and it will be my pleasure to assist you today.
Please do not forget to click a positive rating as this is the only way I receive credit for my answer, thank you.
this is usually due to massive over fueling due to an injector issue or failure of one of the sensors which the engine uses to determine air/fuel mixture (such as the airflow sensor)
another possibility would be oil burning due to a failure of the crankcase ventilation system, but black smoke point more to over fueling
a proper diagnostic scan with high end equipment at a BMW or diesel specialist should be able to verify for you - hopefully it is a more minor issue
Please let me know if you have further questions. Please do not forget to click a positive rating as this is the only way I receive credit for my answer, thank you. Best wishes with your repairs.