I'm making a tool that when given : weight of aircraft , takeoff speed , runway length and some other parameters , it analysis the takeoff performance and states whether using the brakes now is safe or not . So I'm looking for a mathematical relation between the takeoff speed and the takeoff distance to use it in my code . Based on the given speed I want to determine whether the runway length will be enough or there will be a hazard . Is there any mathematical formula for calculating the takeoff distance using takeoff speed and weight ?? or how do people calculate that ? I need any method . Any help is appreciated . Thanks
I think your question is regarding new aircraft under design and not for existing planes?
The dynamics of ground roll/stopping is governed by one equation:
where $T$ is thrust, $D$ is drag, $\mu$ is friction coefficient, $L$ is lift, $m$ is mass and $g$ is gravitational accel. Since thrust, drag and lift are a function of airspeed (and spoilers + brakes + thrust reverser should abort occur), the most naive way is just to numerically integrate the equation twice to get the distance at time.
That being said, don't forget that takeoff distance and accelerate-stop distance must be considered with all engines operating and with the critical engine failed. $V_1$, assuming not limited by controllability, should be selected such that the two distances balance. Also keep in mind that a good portion of takeoff distance is rotating and accelerating to $V_2$ before 35ft with the critical engine failed. The previous equation does not account for that portion.
Generally, the performance charts in the POH are used. You'd have to turn those into account. Runway length, weight, temperature, wind. When I flew a 100HP C150, there were days I couldn't take off with full tanks and my instructor on warm days out of the 1686 foot strip with obstructions where I was based. Even when I moved up to a 180HP C177, there were some trips where I met the family at a longer strip when we had full tanks and were taking a lot of baggage for a family vacation.
For bigger passenger planes, there where days last summer in AZ I think that some planes coudl only depart first thing in the morning because temps got too hot for safe takeoffs, engines couldn't make enough power in the high heat that was occurring.
So you'll need to go plane by plane to create a performance data equation.
You may start by building your model based on a plane with tricycle gear (not a tail dragger) accelerating from standing start Vo to rotation speed Vr. This will make it much easier, as the pitch of the plane will not change.
Acceleration is based on thrust acting on a given mass (a=f/m). In a vacuum you would be done. Not here. Drag begins acting on the aircraft as soon as it moves. Engine rpm may increase as airflow unloads the prop. Pounds of drag must be subtracted from pounds of thrust to yield acceleration at a given speed.
Full scale wind tunnel thrust and drag data from Vo up to Vr speed would generate an acceleration curve for various speeds (in the old days we would reach for log graph paper to try and make it a straight line).
So, even with standard pressure and temperature it is complicated, so one must go and do it the old fashioned way, one data point at a time. As stated in comments, this gives a tabulated chart.
From this chart mathematical extrapolations can be derived, graphs can be drawn, and formulas developed. These formulas can be refined with still more testing. Once these are reasonably accurate, a computer program can be written that will happily crunch combinations of thrust, weight, and drag to generate a take off distance and speed based on the acceleration curve.
Calculations for various flap settings, atmospheric conditions, precipitation, headwinds/tailwinds, and runway surface conditions could be programmed in as well.
But because of the critical nature of take-off distance, thorough validation of published values is a must.