Composition and properties of drilling and completion fluids