Blood-Asp / GT5-Unofficial

Decompiled and modified version of GT5.07.07
160 stars 97 forks source link

[GT5.09.31] Fluid input number and output number #1310

Open lycc193 opened 6 years ago

lycc193 commented 6 years ago

When I looked up the GT ++ recipe, I found some errors(The recipes does not follow the chemical equation), after which @draknyte1 replied to me: The number of input fluids must be equal to the number of output fluids.

So fluids work the same. (With weird exceptions from other mods or vanilla) if you have 1000L of Fluid A and 1000L of Fluid B, you'd have 2000L of Fluid C.

draknyte1/GTplusplus#158

In this case, I want to know if it is necessary to unify the GT's recipe. As of GT5.09.31, there is some inputs equal to the outputs, there are also greater than or less than.

E.g: lefw p8 djbx dtzoyma c z_wg wrry 1 m ews 7 sf 2 sxbk5 z 8a xbhs10ls n8b s76 n5m_v7 pufn u m

And here's an example of GT ++ 9adv8 q df3wp xt7

JohannesGaessler commented 6 years ago

@draknyte1 is missing the central point of what should be conserved. It is not the number of Items or the combined volume of Fluids but the amount of material between inputs and outputs. It's just that if you give each material a constant density in terms of material units you end up with recipes that also conserve fluid volume/item count (space units). What I generally implemented is to have a density equal to the number of atoms in a molecule/repeating unit (formula size). This means that 1 space unit of material will contain as many material units as the materials formula size.

For example: 1 material unit of H2O should be equivalent to 2 material units of Hydrogen and 1 material unit of Oxygen. Hydrogen and Oxygen take up 1 space unit each. You can now have H2O take up an arbitrary amount of space units. As long as you're being consistent for the usage of any one material there is no functional difference. Sensible solutions would be to have it take up either 3 space units (constant density) or 1 space unit (proportional density)

Before I started changing anything the default for any recipe is that each material has a constant density. In consequence, if a chemical reaction is being modeled you will need to weigh each input or output with the size of its formula. While this works fine for simple recipes it does not for complex recipes, particularly if those recipes have 3rd degree compounds.

For example the recipe from the other thread that models the reaction of Ethylene + Benzene -> Styrene + Hydrogen: With constant density: 6x C2H4 + 12x C6H6 -> 16x C8H8 + 2x H With proportional density: C2H4 + C6H6 -> C8H8 + 2x H

With constant density it would be considerably harder to analyze recipes like these because you'd always have to compare a substance's space units against its formula size. For other recipes there are also technical limitations:

For instance, when producing Phenol and Acetone from Cumene: Constant density: 2x O + 21x C9H12 -> 13x C6H6O + 10x C3H6O Proportional density: 2x O + C9H12 -> C6H6O + C3H6O

Since a chemical reactor only has a tank size of 16,000L the use of constant density would limit what molecule sizes you could correctly model. While this recipe would still work it would already be an inconvenience.

What is currently inconsistent is the Electrolysis of materials. The materials that I implemented work according to proportional density but their Electrolyzer recipes still work according to constant density. When I added the materials I wasn't yet sure about how to handle recycling and just allowing lossless Electrolysis would have been unbalanced. I will see to it soon.

lycc193 commented 6 years ago

So, because the capacity of chemical reactors poses a problem, why not give up the chemical reactors in a single block and place the recipes in multiple squares? After all, single block are not suitable for high-volume industrial synthesis.

In this case, why do we maintain two completely different systems at the same time?

Either electrolysis, chemical reactors, distillation or other fluid-related recipes have the problem of two systems coexisting. Should we completely abandon one of these systems? After all, two systems are inconvenient in many cases.

JohannesGaessler commented 6 years ago

So, because the capacity of chemical reactors poses a problem, why not give up the chemical reactors in a single block and place the recipes in multiple squares?

The size of a machine's tank is a rather soft limit. It would be easy to increase the tank size. I mostly brought it up because Alkalus previously argued against increasing machine tank sizes. In case you're not aware of it, there is a multiblock chemical reactor (Large Chemical Reactor). Or do you mean that this sort of processing should be the default?

why do we maintain two completely different systems at the same time? Should we completely abandon one of these systems? After all, two systems are inconvenient in many cases.

I wouldn't go as far as to call it two completely different systems. The fundamental logic of material proportion is the same.

I think for Ores and Alloys constant density works much better than proportional density. I think for chemical recipes proportional density works much better than constant density. I think the inconvenience of having two types of density logic is smaller than the inconvenience from exclusively using one logic.

lycc193 commented 6 years ago

In case you're not aware of it, there is a multiblock chemical reactor (Large Chemical Reactor).

I know there is a Large chemical reactor, so I asked why you did not put these recipes in multiple blocks, but in single blocks

For instance, when producing Phenol and Acetone from Cumene: Constant density: 2x O + 21x C9H12 -> 13x C6H6O + 10x C3H6O Proportional density: 2x O + C9H12 -> C6H6O + C3H6O

Like this recipe, placed in a Large chemical reactor, there is no capacity limit, but also more convenient mass-produced

I think for chemical recipes proportional density works much better than constant density.

I mean, so far, both the ore recipes and the chemical recipes are two systems coexisting. There is proportional density in ore recipes, and constant density in chemical recipes.

Because of this, I asked if I want to unify them. For example, there is only proportional density in chemical recipes and only constant density in ore recipes. And, in doing so, what should be done where chemistry and ore recipes cross?