Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.
I'll try an analogy, for a given size of a painting, you want the general formulas/code how to paint that painting?
For an antenna, if you know all dimensions, material properties, near field environment, frequency and source impedance can S11 be calculated but it will be a rather long and complex formula.
Solving it in a number of sub formulas makes it a bit easier.
You will find most of the needed sub-formulas in this pdf: **broken link removed**
It is a very good and straightforward collection of formulas including how to calculate antenna impedance, starting at p34.
When knowing complex source impedance (Zs) and antenna impedance (Za) can S11 be calculated as S11=(Za-Zs)/(Za+Zs).