The analysis of origin-destination traffic flows may be useful in many contexts of application (e.g., urban planning, tourism economics) and have been commonly studied through the gravity model, which states that flows are proportional to ''masses" of both origin and destination, and inversely proportional to distance between them. Using data on the flow of mobile phone SIM among different aree di censimento, recorded hourly basis for several months and provided by FasterNet in the context of MoSoRe project, in this work we characterize and model the dynamic of such flows over the time in the strongly urbanized and flood-prone area of the Mandolossa (western outskirts of Brescia, northern Italy), with the aim of predicting the traffic flow during flood episodes. Whereas a traditional ”static” mass explanatory variable is represented by residential population (Pop), or by gross domestic product (GDP), here we propose to use a most accurate set of explanatory variables in order to better account for the dynamic over the time. First, we employ a time-varying mass variable represented by the number of city-users by area and by time period, which has been estimated from mobile phone data (provided by TIM) using functional data approach and already adopted to derive crowding maps for flood exposure. Secondly, we include in the model a proper set of factors such as areal and time dummies, and a novel set of indices related to (e.g.) the number and the type of streets, the number of offices, restaurants or cinemas, which may be retrieved from OpenStreetMap. The joint use of these two novel sets of explanatory variables should allow us to obtain a better linear fitting of the gravity model and a better traffic flow prediction for the flood risk evaluation.