public Lauge(Metall metall) { // Erstelle das Hydroxid Oxid hydroxid = new Oxid("OH"); // Berechne die Anzahl der Moleküle (int anzahlMetall, int anzahlHydroxid) = MolekuelHelfer.BerechneAnzahlDerMolekuele(metall.Hauptgruppe, -1); // Füge die Moleküle als Bestandteil der Lauge hinzu AddBestandteil(metall, anzahlMetall); AddBestandteil(hydroxid, anzahlHydroxid); // Setze die Bestandteile Metall = ErhalteMolekuel(metall); Hydroxid = ErhalteMolekuel(hydroxid); // Generiere die chemische Formel und den Namen Name = Metall.Atombindung.ErhalteElement().Name + "hydroxid"; ChemischeFormel = GeneriereChemischeFormelAusBestandteilen(fuerAnzeige: false); }
/// <summary> /// Erstellt ein standart Metalloxid /// </summary> /// <param name="metall"></param> public Oxid(Metall metall) { // Erhalte das Nichtmetall-Saeuerstoff Nichtmetall sauerstoff = Periodensystem.Instance.FindeNichtmetallNachAtomsymbol("O"); if (sauerstoff != null) { // Berechne die Anzahl der benötigen Atome (int anzahlMetall, int anzahlSauerstoff) = MolekuelHelfer.BerechneAnzahlDerMolekuele(metall, sauerstoff); // Füge die Elemente den Bestandteilen hinzu AddBestandteil(metall, anzahlMetall); AddBestandteil(sauerstoff, anzahlSauerstoff); } Sauerstoff = ErhalteMolekuel(sauerstoff); Bindungspartner = ErhalteMolekuel(metall); Name = GeneriereNameErsterOrdnung(); ChemischeFormel = GeneriereChemischeFormelAusBestandteilen(); }