Chain of Unit-Physics: A Primitive-Centric Approach to Scientific Code Synthesis