Because there is a badly smell from the pipe and I have just learnt that it is probably due to lacking of trap. Here is my kitchen pipe. The waste output is shared with the dish washing sink.
The washing machine pipe is putting at the top of the vertical pipe.
Here is the picture of the current status:
And then I plan to do this, I have bought a p-trap like this one without extra valve and going to implement. It is because there is not enough space at the bottom of the vertical pipe to fit the p-trap. So I need to extend it by adding a 90 degree bend corner to redirect the flow to the output. And then suddenly, I find the shape looking like a s-trap. So I would like to ask experienced people that will it cause any problem or unexpected result/drawbacks?
20210725 Edit (credit to @ThreePhaseEel for his suggestion)
This is another arrangement idea by levelling the P-trap output to the waste output.
20210726 Edit Finalise
Based on the consideration of principal, practical size and limitation of the space. Here is the final version implemented.
Based on the following reference from pin-interest: I am not sure if I should paste their image or link because link could change but image attachment might not. If I violate anything, please don't hesitate to tell me and delete them.
distance calculation principal
Because my mansion design is not a direct straight to go down flow, it bend to the right and then right again to the wall outside and then bend again to the vertical pipe. So I think a typical vertical assumption does not fit the situation. I am not good in physics and I don't know how test. And the sink water flow will most likely not that fast to create a siphon to the p-trap water(hopefully).
Our local renovation worker are really workers only, they seldom explain nor resolving problem in right way. They did this setup to share the sink waste water with the washing machine, actually, it shouldn't. All they do is based on time and cost efficiency. I found that there are 2 outputs during the modification. I will keep an eye to see if there is any problem or unexpected effect.(most likely siphon to the washing machine p-trap or bad smell) And I am not sure if there is AAV available for purchase in local store.
After all, I go back to the original purpose, no smell from the sewage output. I cleaned everything including the sink drain.
20210728 Edit
As soon as I saw @Nelson's friendly reminder, I have corrected the direction immediately. (I did not take the updated photo)