During operation, a superconducting radio frequency cavity is cooled down to below critical superconducting temperature by liquid helium. Thus it is under external pressure by liquid helium while an ultrahigh vacuum inside. Being a niobium-made shell structure, the SRF cavity's shape and consequently the electromagnetic resonance frequency are sensitive to external load variations. A CESR-III 500MHz superconducting radio frequency cavity is illustrated to investigate this relationship. A simulation that links the calculations on mechanical structure and radio frequency electromagnetic field with the finite element code ANSYS® is demonstrated herein. The changes of electromagnetic resonance frequency associated with external loads and mechanical properties of niobium are studied systematically. A complete understanding on the mechanism is thus achieved. The computed results also indicate that the electromagnetic resonance frequency increases as the cavity is either cooled to cryogenic temperature or stretched longitudinally, while the reduction of the helium vessel pressure also raises the resonance frequency. Besides, the electromagnetic resonance frequency shift is ruled by the coefficient of thermal expansion when the cavity is cooled from room temperature to liquid helium temperature. Young's modulus and thickness of the cavity wall dominate the structure stiffness and thus also affect the frequency shift.