What to do when a professor gives an undeserved D to a PhD Student? If a professor gives a D for a student "just because", what can the student do?
In previous classes, this student was called ridiculous in the front of all the others, and this professor was always saying bad things about her.
Knowing that a D is a shameful, cut-off  (one can lose their funding) kind of grade, the professor just gave it to the student.

What should one do in this case? It is like someone has the power to crash one's career. It is wrong on every possible level. 

Please, help.
Academia should have moral standards, and things like this should never occur. 

It happened with my partner this morning. She is in shock. She is so brilliant and hardworking. She may have had her career ended today.

P.s: Sorry for the mistakes. I wrote it blindly.
I would advise her to discuss this with her advisor. Do not push the "unethical behavior" idea. Instead, focus on two points:


She does not understand the reasons for the D.
She is concerned about the consequences for her funding etc.


All the better if the advisor is close to the professor who gave the D. It makes the advisor a better potential advocate. No professor likes to have a PhD student fail - it makes them look bad.