BlueM.Sim application: Difference between revisions

From BlueM
Jump to navigation Jump to search
(Unterwasserstand für Wehre und Turbinen)
(BlueM.QGISInterface)
 
(57 intermediate revisions by 7 users not shown)
Line 1: Line 1:
==Allgemeine Hinweise==
__NOTOC__
* Der Name des Datensatzes darf aus nicht mehr als 8 Zeichen bestehen!
{{BlueM_nav}}
This page is an aid to the application of BlueM.


==Systemplan in TALSIM aufstellen und exportieren==
==Dataset==
===Allgemeine Einstellungen===
* A BlueM.Sim dataset consists of several text files. The minimum requirements are an [[ALL-File]] - (general options) and a [[SYS-File]] - (System Plan). Furthermore, files for describing the different types of system elements must be included. All files must have the same filename (which is also the name of the dataset), only the file extensions differ. <small>(The name of the dataset should not be longer than 32 characters! ''See Bug 13'')</small>
* aktualisierte Version von TALSIM (v. 2.01.0009) verwenden!
* A QGIS plugin for creating BlueM.Sim input files, developed by Martin Grosshaus as part of his Master Thesis, is available on GitHub: https://github.com/bluemodel/BlueM.QGISInterface
* Vor dem Starten von TALSIM das Dezimaltrennzeichen in Windows auf Punkt (.) stellen!
* It is possible to create a dataset using [[TALSIM]], which can then be exported and used for BlueM.Sim. Minor modifications to the export files need to be carried out (see [[TALSIM Export]]).
* In der Simulationsverwaltung "Zielfunktion" deaktivieren (oder nachträglich in der exportierter Datei *.ALL ''Berechnung Zielfunktion'' auf N setzen).
''See also [[BlueM Eingabedateien|Input files]]''


===Element Verbraucher===
==Simulation==
* Im Register ''Bedarf'': Wenn die Option ''Datei'' gewählt ist, muss auch eine Gangliniendatei angegeben sein!
[[File:BlueMWin_screenshot.png|thumb|BlueM.Win Screenshot]]
* Im Register ''Zuschuss'': Wenn die Option ''Ganglinie'' gewählt ist, muss auch eine Gangliniendatei angegeben sein!
===Releases starting from 0.9.1===
(Diese Korrekturen können auch nachträglich in der exportierten Datei *.URB durchgeführt werden, in dem die Kennungen "Kng" entsprechend angepasst werden)
For individual simulations, it is easiest to use the '''[[BlueM.Win]]''' package.
* [[BlueM Downloads|Download]] the precompiled package <code>BlueM.Win.zip</code>  and unzip.
* Start the program '''<code>BlueM.Win.exe</code>'''
* Select a dataset
* Start the simulation
* After successful simulation, view the simulation result in [[Wave]].


==Exportierte Dateien überarbeiten==
The computational core (<code>bluem.dll</code>) can be controlled using the API of the [[BlueM.DLLAdapter]].
===Datei *.EXT (Zeitreihen)===
* Die Exportdatei verweist auf die Access-Datenbank der Zeitreihen, dies muss geändert werden, so dass direkt auf die Zeitreihen im Binärformat (*.BIN) verwiesen wird.
* Ausserdem fehlt im Export die Spalte mit Informationen über die Zeitreihen-Interpretation (Spalte erforderlich seit [http://130.83.196.170/websvn/listing.php?repname=BlauesModell&path=%2F&rev=37&sc=1 Rev37]).
Folgendes Format ist erforderlich (Beispiel):
<pre><nowiki>
*Zeitreihen (*.EXT)
*==================
*
*|-----|------|-----|----------------------------------------------------------------------------------|
*|Datei| Einh |Intrp| Name der Binärdatei                                                              |Bezeichnung
*| Nr. |      |    |                                                                                  |
*|-<->-|-<-->-|-<->-|-<--------1---------2---------3---------4---------5---------6---------7--------->-|
|  1  | m3/s |  2  | D:\CODING\BlauesModell\Test\00000861.bin                                        |Demo-Zufluss (79-99)
*|-----|------|-----|----------------------------------------------------------------------------------|
</nowiki></pre>
Mögliche Werte für die Interpretation:
{| class="wikitable" border="1" cellpadding="4" cellspacing="0"
|- style="background-color:#CCCCCC;"
! Wert !! Interpretation
|-
| 1 || momentaner Messwert (z.B. Abfluss)
|-
| 2 || Block rechts, Messwert links ('''Standardwert''')
|-
| 3 || Block links, Messwert rechts
|-
| 4 || Summenlinie
|-
| 5 || Summenlinie pro Zeitschritt (z.B. Niederschlag)
|}


====Automatische Umwandlung der *.EXT durch eine Word Makro====
====Using BlueM.Sim with OpenMI====
Das Word Macro befindet sich hier [[Media:Macro.doc | (Macro.doc)]].
You need an OMI file, an example of which is provided below:
Starten des Makros durch drücken von ''Run Macro''. Es werden nacheinander drei Dialogfelder geöffnet:
<source lang="xml">
* In das erste Dialogfeld muss der Pfad zum Arbeitsordner angegeben werden (z.B.: C:\Projekt).
<LinkableComponent Type="IHWB.BlueM.OpenMIAdapter.BlueM_LinkableComponent" Assembly="D:\BlueM\IHWB.BlueM.OpenMIAdapter.dll">
* In das zweite Dialogfeld muss der Name der umzuwandelnden Datei angegeben werden (z.B.: demo.EXT).  
  <Arguments>
* In das dritte Dialogfeld muss der Pfad zu der zu benutzenden Zeitreihe eingegeben werden (z.B.: D:\CODING\BlauesModell\Test\00000861.bin).  
    <Argument Key="FilePath" ReadOnly="true" Value="D:\Dataset\demoNA" />
* '''Hinweis:''' Word kann die Anzahl Zeichen in den Zeilen nicht zählen, deswegen muss das letzte Zeichen der Zeile ggf. manuell ausgerichtet werden.
    <Argument Key="AnzahlInterneZeitschritte" ReadOnly="true" Value="5" />
* Anschließend die umgewandelte Datei abspeichern (alte Datei überschreiben oder unter neuem Namen speichern).
    <Argument Key="Guetemodell" ReadOnly="true" Value="false" />
    <Argument Key="Guetemodell_Abbauprozess" ReadOnly="true" Value="true" />
    <Argument Key="Guetemodell_Dispersion" ReadOnly="true" Value="false" />
    <Argument Key="Guetemodell_Merge" ReadOnly="true" Value="false" />
    <Argument Key="Simulationsanfang" ReadOnly="true" Value="28.12.1967 00:00" />
  </Arguments>
</LinkableComponent>
</source>


==Unterwasserstand für Turbinen und Wehre==
The directories have to be modified to point to the correct locations on your computer.
Ein Unterwasserstand wird durch eine Kontrollfunktion (Systemzustand) übergeben. In der TALSIM-Oberfläche ist dies nicht möglich, aber durch Bearbeiten der Eingabedateien. Dazu muss in der Datei *.HYA in die Spalte "WSP unten / KTRID" die ID der gewünschten Kontrollfunktion, die den Unterwasserstand übergibt, eingetragen werden. Die IDs der Kontrollfunktionen werden in der Reihenfolge ihrer Auflistung in der Datei *.KTR vergeben.


==Verschiedenes==
<u>Explanation of the argument keys:</u>
Kleine Bugs in den Exportdateien, die die Simulation aber nicht beeinflussen:
* '''*.TAL''': Bei der Speicherkennlinie wird das Volumen in normierter Form (0 bis 1) in die Exportdatei geschrieben, in der Spaltenüberschrift steht aber als Einheit "Tsd.cbm".


[[Category:BlauesModell]]
Location of the dataset (path and filename without ".ALL")
<source lang="xml"><Argument Key="FilePath" ReadOnly="true" Value="D:\Dataset\demoNA" /></source>
 
How many internal timesteps within one OpenMI timestep
<source lang="xml"><Argument Key="AnzahlInterneZeitschritte" ReadOnly="true" Value="5" /></source>
 
Use the water quality model ([[SWQM]])?
<source lang="xml"><Argument Key="Guetemodell" ReadOnly="true" Value="false" /></source>
 
Use degradation processes in the quality model ?
<source lang="xml"><Argument Key="Guetemodell_Abbauprozess" ReadOnly="true" Value="true" /></source>
 
No effect yet !
<source lang="xml">
<Argument Key="Guetemodell_Dispersion" ReadOnly="true" Value="false" />
<Argument Key="Guetemodell_Merge" ReadOnly="true" Value="false" />
</source>
 
Start date of the simulation:
<source lang="xml"><Argument Key="Simulationsanfang" ReadOnly="true" Value="28.12.1967 00:00" /></source>
 
===Release 0.9===
[[File:BlueMExe_screenshot.png|thumb|BlueM.exe Screenshot]]
* In the simplest case the compiled EXE file ([[BlueM Downloads|BlueM.exe]]) is in the same directory as the dataset to be simulated. In this case, simply launch the EXE and then enter the dataset name.
* You can specify the name of the dataset directly as a parameter to pass to BlueM.exe
:<pre class="dos">C:\WorkingDir>"path\to\BlueM.exe" datasetname</pre>
* To prevent the window from closing immediately when the simulation is finished or an error has occurred, a shortcut to BlueM.exe can be created. In the properties of the shortcut enter the following "target":
:<pre>cmd.exe /K "path\to\BlueM.exe"</pre>
:Also, specify the working directory as the directory in which the dataset is located.
 
==Results==
* Depending on the settings, BlueM.Sim creates different result files. By default, the main results are written to a [[WEL-File]].
''See also [[BlueM Ausgabedateien|output files]]''
 
===Errors / warnings===
* Errors cause the simulation to stop and must be remedied. All errors are logged to an [[ERR-File|*.ERR file]] in the dataset directory. The *.ERR file contains the date and time of the simulation in the filename and is preserved until deleted by the user. The error messages sometimes contain [[ERROR-Konstanten | error constants]].
* Warnings that occur during the simulation are also logged to a file ([[$WARN.TMP]]), which is deleted each time a new simulation is started.
 
[[Kategorie: BlueM.Sim Anwendung|A]]

Latest revision as of 05:56, 5 March 2022

BlueM_icon.png BlueM.Sim | Downloads | Application | Theory | Development

This page is an aid to the application of BlueM.

Dataset

  • A BlueM.Sim dataset consists of several text files. The minimum requirements are an ALL-File - (general options) and a SYS-File - (System Plan). Furthermore, files for describing the different types of system elements must be included. All files must have the same filename (which is also the name of the dataset), only the file extensions differ. (The name of the dataset should not be longer than 32 characters! See Bug 13)
  • A QGIS plugin for creating BlueM.Sim input files, developed by Martin Grosshaus as part of his Master Thesis, is available on GitHub: https://github.com/bluemodel/BlueM.QGISInterface
  • It is possible to create a dataset using TALSIM, which can then be exported and used for BlueM.Sim. Minor modifications to the export files need to be carried out (see TALSIM Export).

See also Input files

Simulation

BlueM.Win Screenshot

Releases starting from 0.9.1

For individual simulations, it is easiest to use the BlueM.Win package.

  • Download the precompiled package BlueM.Win.zip and unzip.
  • Start the program BlueM.Win.exe
  • Select a dataset
  • Start the simulation
  • After successful simulation, view the simulation result in Wave.

The computational core (bluem.dll) can be controlled using the API of the BlueM.DLLAdapter.

Using BlueM.Sim with OpenMI

You need an OMI file, an example of which is provided below:

<LinkableComponent Type="IHWB.BlueM.OpenMIAdapter.BlueM_LinkableComponent" Assembly="D:\BlueM\IHWB.BlueM.OpenMIAdapter.dll">
  <Arguments>
    <Argument Key="FilePath" ReadOnly="true" Value="D:\Dataset\demoNA" />
    <Argument Key="AnzahlInterneZeitschritte" ReadOnly="true" Value="5" />
    <Argument Key="Guetemodell" ReadOnly="true" Value="false" />
    <Argument Key="Guetemodell_Abbauprozess" ReadOnly="true" Value="true" />
    <Argument Key="Guetemodell_Dispersion" ReadOnly="true" Value="false" />
    <Argument Key="Guetemodell_Merge" ReadOnly="true" Value="false" />
    <Argument Key="Simulationsanfang" ReadOnly="true" Value="28.12.1967 00:00" />
  </Arguments>
</LinkableComponent>

The directories have to be modified to point to the correct locations on your computer.

Explanation of the argument keys:

Location of the dataset (path and filename without ".ALL")

<Argument Key="FilePath" ReadOnly="true" Value="D:\Dataset\demoNA" />

How many internal timesteps within one OpenMI timestep

<Argument Key="AnzahlInterneZeitschritte" ReadOnly="true" Value="5" />

Use the water quality model (SWQM)?

<Argument Key="Guetemodell" ReadOnly="true" Value="false" />

Use degradation processes in the quality model ?

<Argument Key="Guetemodell_Abbauprozess" ReadOnly="true" Value="true" />

No effect yet !

<Argument Key="Guetemodell_Dispersion" ReadOnly="true" Value="false" />
<Argument Key="Guetemodell_Merge" ReadOnly="true" Value="false" />

Start date of the simulation:

<Argument Key="Simulationsanfang" ReadOnly="true" Value="28.12.1967 00:00" />

Release 0.9

BlueM.exe Screenshot
  • In the simplest case the compiled EXE file (BlueM.exe) is in the same directory as the dataset to be simulated. In this case, simply launch the EXE and then enter the dataset name.
  • You can specify the name of the dataset directly as a parameter to pass to BlueM.exe
C:\WorkingDir>"path\to\BlueM.exe" datasetname
  • To prevent the window from closing immediately when the simulation is finished or an error has occurred, a shortcut to BlueM.exe can be created. In the properties of the shortcut enter the following "target":
cmd.exe /K "path\to\BlueM.exe"
Also, specify the working directory as the directory in which the dataset is located.

Results

  • Depending on the settings, BlueM.Sim creates different result files. By default, the main results are written to a WEL-File.

See also output files

Errors / warnings

  • Errors cause the simulation to stop and must be remedied. All errors are logged to an *.ERR file in the dataset directory. The *.ERR file contains the date and time of the simulation in the filename and is preserved until deleted by the user. The error messages sometimes contain error constants.
  • Warnings that occur during the simulation are also logged to a file ($WARN.TMP), which is deleted each time a new simulation is started.