This work presents a computational code that calculates in a hard-link fashion the optical and thermal behavior of a linear Fresnel collector (LFC). The code was written in Python language and is composed by three parts. First, an optical model that computes the optical and étendue efficiencies, as well as the whole optical losses in the mirrors field. For that, given a location (latitude) and a date, the program positions the mirrors and then the code uses the software Solstice to conduct such computations. Second, the code automatically takes the results of the optical computations (fluxes on the receiver surfaces) and uses them as input in a thermal model of a trapezoidal receiver. This model uses thermal resistances as a simplification of the physics into the receiver. The thermal efficiency and the whole thermal losses are computed in this part. Finally, the code runs simulations for several dates in order to obtain the annual behavior of the LFC. The models were validated by repeating the simulation of a reference for the optical case and by numerically comparing with a CFD simulation for the thermal case. A discussion of the accuracy of the model is also done. Furthermore, this code may be very useful to conduct parametric studies and optimizations, since the time required for an annual simulation is close to 21 minutes.