Calculate a piecewise function?

Hey,
This is my first post in the Wolfram Community, and I must say, I have been looking up multiple discussions before, but I could not find an answer to the problem I’m having right now.
I have made a function (S_d), which consists out of multiple functions for certain x-values, I have used a piecewise for this.
When I call the function with a certain x-value (T-value in this case), I get the y-value from it. However, when I tried it again with a different T-value, I did not get my y-value, but the following:

Output1.jpg

The following is what happens earlier in the notebook, which is what I expected and what I need in order to continue with the calculations:

I would really appreciate if you could take a look at this and tell me where I made a mistake or what I can do to repair this and prevent this for future use.
Thanks a lot in advance!

Best regards,
Hidde Lansink

Assignment.nb (90.8 KB)

Cause of the problem is that symbols Sd1 and Sd2 are both defined twice. First in In[9]. Then later on in In[75] and In[76], where they are assigned a numerical value. In the attached I have used different symbols in the first and last parts.

Assignment Edit.nb (101 KB)

That solved the trick indeed, thanks a lot!