Your description of what primary and secondary beams do is dramatically different to the definition given in the link you present (which is itself correct).
To quote the answer in your link:
A horizontal beam connecting columns (simply supported or shear connected.)
Function: It will transfer the load from secondary beam(if present) to the columns.
A horizontal beam connecting primary beams (simply supported or shear connected.)
Function: It will transfer the load to the primary beam and not directly connected to the columns.
That is the only difference. Secondary beams take in the loads from the slab and transfer them to the primary beams, which then transfer them to the columns.
So all you need to do in your FEA software is allow the user to define how these loads are applied. You don't need to create different categories of beam elements (primary vs. secondary).
You are calling your software a frame analysis tool. This implies that 2D elements like plates and shells aren't available, only 1D beam elements. This therefore means that the user will have to take some decisions as to how area loads which are applied to the slab (which you can't model, since you don't have 2D elements) are transferred.
- If your program is simple, the user will have to apply the linear distributed loads on each beam by hand. In this case, there's no problem: the user applies the relevant loads on the secondary beams which then transfer them to the primary beams.
- Your program may also include "area loads", where the user defines an area and a load and the program automatically decides how to distribute this area load to the beams, usually through tributary areas. So long as the user can define the beams that are to be considered for these area loads, that's also not a problem. You just define the area load and then tell the program to only consider the secondary beams (though, depending on the layout, letting some of the load go directly to the primary beams would actually be more correct).
- If your program is actually a full structural analysis tool with 2D elements (and is therefore more than just a frame analysis tool) as well to model the slab, that's still fine. If the user can tell the slab not to take the specific beams into consideration while meshing (such as your intended primary beams), they won't share any nodes and therefore won't have any direct load transfer. The slab will mesh joining itself only to the remaining beams, transferring loads to them, who will then transfer the loads to the primary beams.
Also, the image in your OP is a poor example of primary and secondary beams because, structurally, they are identical. The secondary ones are a bit shorter, but they share the same top-level with the primaries. This means that when the slab transfers loads, it makes no distinction between them. Look at the tributary areas for each slab, it's clear the vast majority of the loads will naturally go to the secondaries, with only a small triangle of load going to each of the primaries. Therefore, when you model them there should be no distinction between them: the loads should go where they naturally wish to go.
However, if you're modelling something like the roof below, then you'll need to control how the loads are distributed. After all, all the loads coming from the roof need to go through the purlins. None of the loads may go directly to the rafters.