I am trying to simulate a lamda/2 transmission line resonator (simple transmission line of lamda/2 length) at 2.4GHz in HFSS. But I am unable to get the peak of S21 at 2.4GHz, rather around 5GHz. What could be the problem?
I do not know about simulations. Real resonators do respond to harmonics. A half-wave resonator behaves according to coupling coefficients from a 50-Ohm line and back. Check your couplings.