When I look for white dwarf binaries (specifying WD as primary) the vast majority of the ones that show up have L Dwarf companions (though the more massive WDs have M V companions). This doesn't seem realistic. The mass ratio for main sequence primaries (e.g. K V) in SE can be a lot closer to 1, which means that one can find a K5 V orbiting a K0 V star for example. But for WDs, the mass ratio seems to be (at most) 10:1.

In fact, looking at the most massive WDs (close to 1.4 solar masses), I didn't find any companion that was even 1/10th of the mass of the white dwarf primary - though all the companions were mid-M V stars. The lower mass WDs (around 0.5 solar masses) were more like 8-10 times more massive than their invariably L brown dwarf companions, and none had M V companions.

This seems wrong. If SE uses mass ratios to generate companions then it should be using the mass of the original WD progenitor star (which would be anything between about 1 and 8 solar masses), not its current WD mass (0.5-1.44 solar mass). We should expect white dwarfs to be orbiting pretty much any kind of main sequence star or red giant, or even other WDs (maybe they are, I just don't have a way to locate systems in SE that have WD companions).

Is that what's happening here? Not sure why the mass ratio is so much more extreme for the WD companions either. In fact I think it'd be more likely for WD progenitor stars (being more massive) to have A/F/G/K V companion stars (or evolved giant versions of them) than to have M or L V ones.

I get what you mean, but remember that SpaceEnigne is still beta, and the procedural star systems are no where near perfect.

"You're capable of such beautiful dreams, and such horrible nightmares. You feel so lost, so cut off, so alone, only you're not. See, in all our searching, the only thing we've found that makes the emptiness bearable, is each other.”- Carl Sagan

I think the system generation has been pretty good so far (I have far fewer complaints about SE's systems than I do Elite Dangerous', for example). But if this is being calculated incorrectly then maybe the devs can take a look at it?

"You're capable of such beautiful dreams, and such horrible nightmares. You feel so lost, so cut off, so alone, only you're not. See, in all our searching, the only thing we've found that makes the emptiness bearable, is each other.”- Carl Sagan

It's curious because Elite Dangerous's Stellar Forge does the same thing. I'm wondering if they share a common flaw or if the devs on both are using some scientific literature that claims that WDs should have smaller companions that I'm unaware of...

Neutron Star binaries are similarly odd - a lot of their companions are M or L dwarfs (so their mass ratios are even smaller), but they also seem to have a higher chance of having a WD companion or even another neutron star as a companion. I've not run into any NS with any other kind of companion so far though.

EDIT: I just did a survey of 38 systems with NS primaries found within 1000 ly of the central black hole of NGC 4676-1 (one of the Mice Galaxies) and of those 7 systems (the most massive neutron stars) had late M V companions, 28 had L V companions, 2 had T V companions, and one orbited a Black Hole (not sure how that showed up on the list since I specified a NS as the main star!). So the majority of systems with a Neutron Star primary have L companions? There seems to be something even weirder going on with the masses of Neutron Star companions here.

Black Hole Binaries are similarly affected - they seem to be rarer but the five black hole primaries that showed up on my search within 1000 ly all had L V companions. So with black holes it looks like the primary:companion mass ratio is more like 100:1!

This is because how planetary system generator works. It must generate stellar companions in that way so their total luminosity = system's luminosity. The system's luminosity is taken from the star octree and cannot be altered, otherwise there will be a sudden change in apparent magnitude then user approaches the system from interstellar space.

The planetary system generator takes the system's stellar class (again - already defined in star octree), and randomly splits it into a binary, using a binary to solitary split probability (ProbBinaryStar parameter in the config file). It then repeats splitting each component, using binary to tripe probability. And one more step, so SE can generate up to octuple system.

The split function has who ways to generate a binary with a stellar remnant:1) Generate a stellar remnant companion based on probability from the config. Its luminosity is considered zero.2) Generate a brown dwarf based on brown dwarf companion probability.3) Generate a companion mass with a Gaussian distribution (center = 0.75 * initial mass, sigma = 0.3 * initial mass). After that, compute companion mass (assuming it is a normal Main sequence star), and other properties. At this stage, companion can be turned into stellar remnant if its lifetime on the MS branch exceeds system's age.

I think the problem is with the condition 1: stellar remnant's mass does not depend on the first companion's mass. Are there some scientific papers with mass ration distribution? Especially in multiple systems.

ideally I think the binary system should start off (in the computation process) as two main sequence stars, in which the more massive star evolves off the main sequence first into a remnant (WD, NS or BH). So the companion should be created based on in the initial mass of the remnant's progenitor star, and then its final status would depend on the system age (is it old enough that the companion has evolved into a giant or remnant?) and whether it's affected by the primary's supernova (if that happened).

That sounds equivalent to the third option in your list, but are you saying that doesn't happen if the primary is a stellar remnant because the primary is assumed to have zero luminosity?

I'm not sure what the literature is like on the subject, but it'd make sense to assume that the mass ratio of the companion should be based on the masses of the stars when they formed. There's no reason to believe that companions in binary systems suddenly all change to late M V or brown dwarfs when the primary turns into a remnat.

No, generation must be based on a total system luminosity. The star generator (generator of stars in the galaxy) is based on star luminosity, because it is designed to generate and render only what is visible to observer. Generation of the planetary system (binary companions are members of a planetary system) occurs only when camera approaches to the system very close. It must create solitary or multiple star system so its total luminosity match the luminosity given by the star generator. This adds complexity, because it is not obvious how to generate evolved stars to match both their statistical properties and luminosity limitations.