=======================================================
|| C A S E G E N - a highly customizable tool for... ||
|| [BATCH], [ANALYZE] and [OPTIMIZE] cases in OpenFOAM ||
|| -written in Python 2.7- ||
|| version [0.99] license [gpl] last update [21.09.12] ||
|| contact [karl@bedrich.de] ||
=======================================================
Hey, thanks for trying out 'caseGen'.
This program is very powerful indeed - with it you can simplify your numerical problem by:
--> Create individual cases out of a TEMPLATE-folder and predefined parameters.
--> Start one or more cases in serial or parallel (even on a cluster-system).
Because 'caseGen' only defines the input and works with the output it should be
possible to use more programs as solvers - not only OpenFOAM!
--> Create new data-sets as functions of generated sets and defined parameters
(with this its even possible to compute characteristical numbers by sampling
existing stream-parameters e.g. forces, Nu-Numbers what-ever out of data-sets
of velocity, temperatures generated by your numerical solver).
--> Compress your data-sets by setting a linear or logarithmic interval.
And the best thing of all:
--> You have the power to choose whether you want to do every- or only something,
whether you want to solve every possible case or only the cases number {X} to {Y}.
Later it will be also possible to use 'caseGen' even for optimization-problems. Then you only
have to define your problem and how this problem can be solved, all the rest wont be
your business any more!
REQUIREMENTS:
--> Linux (actual tested on Ubuntu11.04 and debian5?)
--> Python 2.7
including the third-party-librarys...
==> 'ooolib' (installed global or local by copying in the caseGen/-directory)
... necessary to use the ODS[]-in-cell-function (F.1.b) as well the
output-to-ods function
... see http://sourceforge.net/projects/ooolib
==> 'numpy' (global because of fortran-functionality)
... see http://sourceforge.net/projects/numpy
==> 'sciPy' (also global)
... necessary when optimizing via "SPLINE"-interpolation
... http://sourceforge.net/projects/scipy
--> Simulation-environment to control (actual tested with OpenFOAM 1.6ext and 2.0.0)
NOW START BY OPEN 'SAMPLECONFIG_for_caseGen' FOR INDEX AND OVERVIEW!
========================================================================================
{X.1}: methods to get through this (pretty long) help-document:
========================================================================================
- all {substitutes} sorted chronological and hierarchic, so:
- look in the 'SAMPLECONFIG'-file for an overview
- AND scroll to the chapter/substitute of our choice
- OR search (e.g. via [STRG+f]) {definitions of substitutes} or (quotations)
========================================================================================
{X.2}: legend and formatting:
========================================================================================
- headings (hierarchical decreasing)
===, ---, ...
***subheadings***
- definitions
{number of substitute}
- quotations
(number of substitute)
- functions used by 'caseGen':
FUNCTION
- structure-elements used by python:
[list], (tuple), "string", definition(:), equation(=), separation(, ;)
========================================================================================
{X.3}: folder structure:
========================================================================================
- All Problems which are computed by 'caseGen' are summarised in so called
'problem-folders' located in your 'caseGen'-directory.
- These folders have to contain at least the following sub-folders:
- 'CONTROLDICTs/' -> containing one or more config-files like
'SAMPLECONCIG_for_caseGen'
- 'TEMPLATE/CASES/' -> (3.1) containing at least one case-folder
- 'TEMPLATE/MESHES/'-> (3.2) containing folders including mesh-data
(ONLY if option (3.2) is used)
REMEMBER:
________________________ ___________________________ _____________________________
|mesh and case-folders in| | procedure in CONTROLDICTs/| | indie. solution in SOLUTION/|
| TEMPLATE/ |==>| chosen by 'caseGen.py' |==>| + STARTCASE.sh |
-------------------------- --------------------------- | + CASE_DESCRIPTION |
| + individual output |
| as given in (5.1) |
------------------------------
========================================================================================
{X.4}: run caseGen in background
========================================================================================
Its possible to run one or more classes of a problem started by caseGen in the background.
--> Therefore type something e.g. 'python caseGen.py -p1 -c2,3 -f1,1 > back.log &' where
... 'p' means 'problem' or 'problemfolder'
... 'c' means 'class' of the problem/CONTROLDICTs/file
... 'f' means further instructions to start caseGen
... '> back.log' means that all output generated by caseGen will be written in a file
called back.log
... '&' is the attribute to run a process in background (in linux)
In this example you start the second and third class of your first problem (the numbers are
short when starting caseGen normaly) with two times the first option in the further
questions (whose may triggered by a 'CHOOSE[]' function).
To if you want to kill a process running in background first get the process-ID with
'pidof python' and kill it with 'kill -9 [prozessID]'
Get further help by typing 'caseGen.py -h' OR '-help'
========================================================================================
{X.5}: start additional features of caseGen
========================================================================================
==> 'python caseGen.py -logAnalyzer FILENAME {STARTSTRING} {INTERMEDIATESTRING(S)} {ENDSTRING} optional: ODS
Get and sort values out of unsortet plaintext-files e.g. log-files.
EXAMPLE: you have a file called 'log.simpleFoam'
in this file the time is those dimension which seperates the all following dimensions like Resuduals or Pressure-averages
Then type sth. like the following:
'python caseGen.py -logAnalyzer {Time =} {[Ux, Final Residual =]} {pressure gradient =}'
to get the the first value in each timestep which comes right after the {STRING, AND/OR SECOND STRING} which is singular in every step.
If you have to give more entries to make your string singular surround everything by [...] and seperate every string whith a comma.
caseGen now create a file in the folder in which it is running called FILENAME.caseGenLogAnalyzed in whose every value is nicely sorted
and readable for humans and gnuplots and ...
Add 'ODS' if you want the output printed in a openOffice-calc file named 'caseGenLogAnalyzed.ods'.
Thise feature start its internal value-crawler-engine for unsorted AND sorted files described in (5.1.d).
/////////////////////////////////////////////////////////////////////////////////////////
=========================================================================================
{0.1}: put ALL solutions in an extra folder
=========================================================================================
***location***
put_ALL_solutions_in_an_extra_folder_called = {"OWN_NAME": 0.1}
***examples***
{0.1} = ""
{0.1} = "karls_work"
***usage***
Copy all generated solutions from all classes on one extra directory.
=========================================================================================
{0.2}: define a name of your 'class' (which contains you batch-problem)
=========================================================================================
***location***
class {NAME_OF_YOUR_CLASS: 0.2}
***examples***
{0.2} = test_problem
{0.2} = final_configuration_of_new_solver
{0.2} =
***usage***
test_problem: - Because 'caseGen' gives you the option to start one or more batch-problems
('classes') in serial it's necessary to separate the 'classes' from each other by name them.
[empty]: - If you have only one 'class' in a controldict-file in /CONTROLDICTs its
possible to name that 'class' automatically after the file-name
by deleting (0.2) so that "class :" is the result.
***requirements***
Expressions for (0.2) has to be written as one or more words (no numbers at the beginning!)
connected by '_' and also be individual named. If there are classes with the same name 'caseGen'
prints an error.
=========================================================================================
{0.3}: describe your 'class'
=========================================================================================
***location***
{"""OWN_DESCRIPTION""": 0.3}
***examples***
{0.3} = """"""
{0.2} = """this option needs openfoam 1.6ext installed"""
***usage***
If you need a better description for a class then (0.2) gives you one like shown in
examples.
=========================================================================================
{0.4}: define a template-class from which all parameters that aren't listed were copied
=========================================================================================
***location***
TEMPLATE_class = {"NAME_OF_SOME_CLASS_FROM_WHICH_ALL_NON_LISTED_PARAMETERS_ARE_COPIED": 0.4;''}
***examples***
{0.3} = ""
{0.2} = "myTemplateClass"
***usage***
If you have some classes which are mainly the same - e.q. all of those classes have the same
OUTPUT-functions - and you only want to change a very few entries in your actual class its
usefull to define a template-class. If this parameter is set all following parameters
in your actual class change or respectively append those entries in your template-class.
Still confused? See the tutorial/CONTROLDICTS/with_template_class.
=========================================================================================
{0.5}: display at which solution 'caseGen' stopped
=========================================================================================
***location***
restart_last_process_at = [some_solution_number]
***explanation***
- 'caseGen' logs the process of every solution. If the program was killed by blackout, it will
be automaticaly restored by typing 'r' in front of the case-number when restarting 'caseGen'
the next time.
- By editing the setted number it's also possible to start only one process when the number
is not in the range defined by (1.4) or to start in an individual point in the range.
=========================================================================================
{0.6}: write a log with all caseGen-messages
=========================================================================================
***location***
write_log_file = {"yes" OR "no": 0.6; 'no'}
***examples***
{0.6} = "yes"
{0.6} = "no"
***usage**
"yes": - Build a folder called "LOG" in the main problem-folder and save every message
caseGen prints in a log file.
"no": - Do nothing.
=========================================================================================
{1.1}: use exiting or generate new cases
=========================================================================================
***location***
generate_new_cases = {"no" OR "yes": 1.1}
***examples***
{1.1} = "yes"
{1.1} = "no"
***usage***
"yes": - New case-directories will created in SOLUTION/(0.1)/(2.1)/.
(existing directories will be deleted)
"no" - If an analogical folder exists in SOLUTION/(0.1)/(2.1)/ it will be used.
(that means that all entries from (3.x) and (4.1) won't change)
=========================================================================================
{1.2}: number of cases solved simultaneous
=========================================================================================
***location***
solve_cases_simultaneous = {integer: 1.2}
***examples***
{1.2} = 0 OR "no"
{1.2} = 1
{1.2} = 5
***usage***
0: - (4.1) won't be executed - the case won't be solved.
1: - All cases will be solved in serial.
This means, that 'caseGen' waits until every process started with (4.1) ends.
At the moment that will only work, when (4.1) starts the process directly
and doesn't delegate it, as it is done in some cluster-systems e.g. via the command
'qsub'.
[more]: - [more] processes will run in parallel. Following cases will have to wait until
one of [more] processes ends.
- This option is pretty useful if you have a multi-core-cpu or run 'caseGen' in a
cluster-system.
=========================================================================================
{1.3}: handle the generated output with (5.x)
=========================================================================================
***location***
collect_output = {"yes" OR "no": 1.3}
***examples***
{1.3} = "yes"
{1.3} = "no"
***usage***
"yes": - The data-sets which are created via the command in (4.1) will be sighted and
arranged like (5.x) defines.
"no": - There will be no work on the generated data-sets.
=========================================================================================
{1.4}: handle the generated output with (5.x)
=========================================================================================
***location***
arrange_only_solutions_between_number = ({START_INTEGER, STOP_INTEGER: 1.4})
***examples***
{1.4} = ()
{1.4} = (37,45)
***usage***
(): - Every solution will be arranged.
(X,Y): - Only solutions in the range from X to Y will be arranged.
- Example: The quantity of solutions defined by (2.3) and (3.3) is 50 and (1.4) is
defined like the second example:
The solutions between 1 and 36 as well as 46 and 50 will be ignored.
The solutions between 37 and 45 will be arranged.
=========================================================================================
{2.1}: put all solutions in the 'class' in an extra folder
=========================================================================================
***location***
put_CLASS_solutions_in_an_extra_folder_called = {"OWN-NAME": 2.1}
***examples***
{2.1} = ""
{2.1} = "CASE"
{2.1} = "CASE_on_MESH"
{2.1} = "icoFoam_with_upwind"
***available functions***
"CASE": - This placeholder-function and will be automatically substituded by the real case-name.
- It replaces also the automatically generated 'CASE-{case-name}'-phrase of each
individual generated solution.
"MESH": - This placeholder-function and will be automatically substituded by the real mesh-name.
- It replaces also the automatically generated '_MESH-{mesh-name}'-phrase of each
individual generated solution.
"PARAMETER[{some name of 3.3.a}":
- This function substitudes the parameter-name written between [...] with its value
for the actual solution.
- This is usefull when e.g. you want to run a process in parallel and want to specify the number
ob processors with a parameter-name written in 3.3.a like:
"run_on_PARAMETER[CPUs]_cpus"
***explanation***
"": - Every solution will generated in SOLUTION/(0.1)/
"icoFoam_with_upwind":
- Every solution will generated in SOLUTION/(0.1)/icoFoam_with_upwind/
=========================================================================================
{2.2}: override existing or rename new case
=========================================================================================
***location***
override_existing_cases = {"yes" OR "no" OR "time_separated": 2.2}
***examples***
{2.2} = "yes"
{2.2} = "no"
{2.2} = "time_separated"
***usage***
"yes": - If an analogical folder exists in SOLUTION/(0.1)/(2.1)/ it will be
substituted.
"no": - If an analogical folder exists in SOLUTION/(0.1)/(2.1)/ a new case
will be separated by adding a number (f.e.: "__2").
"time_separated":
- If an analogical folder exists in SOLUTION/(0.1)/(2.1)/ a new case
will be separated by adding the time of creation
(f.e.: "__12.01.2012_at120334").
***requirements***
- This option will only take effect if (1.1) = "yes"
=========================================================================================
{2.3}: combine the parameters with each other
=========================================================================================
***location***
combine_parameters = {"yes" OR "no" OR "successive": 2.3}
***examples***
{2.3} = "yes"
{2.3} = "no"
{2.3} = "successive"
***usage***
Example: there are two parameters defined in (3.3) named:
"temperature" with (300, 400)
"velocity" with (10, 20, 30)
"yes": - Combine the parameters with each other.
-> 'caseGen' generates six solutions:
(300-10, 300-20, 300-30, 400-10, 400-20, 400-30).
"no": - Do not combine the parameters with each other.
-> 'caseGen' generates only three solutions:
(300-10, 400-20, 400-30).
"successive":
- Choosing this option let's you vary only one parameter at once
-> 'caseGen' generates this six solutions:
(300-10, 400-10,
300-10, 300-20, 300-30).
***requirements***
- This option will only take effect if (1.1) = "yes"
=========================================================================================
{2.4}: show the parameters of (3.3) in directory title
=========================================================================================
***location***
show_parameters_in_directorytitle = {"full" OR "only_values" OR "first[INT]_full" OR "first[INT]_only_values" OR "no": 2.4; 'first_full' }
***examples***
{2.4} = "full"
{2.4} = "only_values"
{2.4} = "first_full"
{2.4} = "first3_full"
{2.4} = "first_only_values"
{2.4} = "first2_only_values"
{2.4} = "no"
***usage***
Example: there are two parameters defined in (3.3) named:
"t" with (300, 400)
"v" with (10, 20, 30)
-> the first case will stored in ...
"full": - Parameter names and its values are stored the directorytitle.
--> SOLUTION/(0.1)/(2.1)/CASE-(3.1)_MESH-(3.2)_PARAM-t-300-v-10__1/
"only_values":
- Parametervalues are stored the directorytitle.
--> SOLUTION/(0.1)/(2.1)/CASE-(3.1)_MESH-(3.2)_PARAM-300-10__1/
"first_full" AND "first_only_values":
- Same as above, but uses only the first written parameter in your
CONTROLDICTs-file
- If you write a number like '2', '3' or '15' after 'first' only the entries of the first
'2', '3' or '15' parameters were shown in the directorytitle.
"no": - No parameters are in the directorytitle.
--> SOLUTION/(0.1)/(2.1)/CASE-(3.1)_MESH-(3.2)__1/
***general***
- the last entry e.q. "__1" represents the solutionnumber
- if (2.1) include the entry "CASE" or "MESH" their corresponding entries only be
in (2.1) and not here. For further information see (2.1).
=========================================================================================
{3.1}: name of TEMPLATE/CASES/myCase
=========================================================================================
***location***
CASE = {"CASE_FOLDER_NAME_IN_TEMPLATE/": 3.1}
***examples***
{2.4} = "myCase"
***usage***
Choose which directory has to be copied and edited by the parameters defined in (3.3).
=========================================================================================
{3.2}: name of used meshes in TEMPLATE/MESHES
=========================================================================================
***location***
MESHES = [{"FIRST_USED_MESH_FOLDER_NAME_IN_TEMPLATE/": 3.2},{"POSSIBLY_NEXT_USED_MESH"},{"AND_SO_ON"}]
***examples***
{2.4} = ""
{2.4} = "mesh_1000Cells"
{2.4} = "mesh_1000Cells", "mesh_15000Cells"
***explanation***
Choose which mesh-folder has to be copied in the new case-folder from (3.1).
"": - If you have your case and your mesh together in a TEMPLATE/CASES/-folder its possible to not choose
an extra mesh.
"mesh_1000Cells":
- Copy the folder TEMPLATE/MESHES/mesh_1000Cells into the new generated
SOLUTION/(0.1)/(2.1)/INDIVIDUAL-CASE-folder (existing files would be overridden)
"mesh_1000Cells", "mesh_15000Cells":
- If you want to get solutions for more meshes in serial, type in more meshes separated by comma.
Example: (3.3) defines three solutions (v = 1,2,3) and (3.2) = "mesh1", "mesh2".
'caseGen' now will generate the following six solutions:
[(1-mesh1),(2-mesh1),(3-mesh1),(1-mesh2),(2-mesh2),(3-mesh2)]
=========================================================================================
{3.3}: entries to define the parameters in SOLUTION/(0.1)/(2.1)/INDIVIDUAL-CASE-FOLDER
=========================================================================================
***location***
PARAMETERS = [{3.3},{}, ... {}]
***general***
{3.3} = ({parameter_name: 3.3.a}, {parameter_source: 3.3.b}, {substitute_function: 3.3.c}, {substitute: 3.3.d})
***examples***
{3.3} = # Leave empty if you don't use the parameters-option.
{3.3} = ("rho_f","/system/controlDict", "RRR", 1000)
{3.3} = ("rho_f","/system/controlDict", "RRR", 1000, 1100, 1500)
{3.3} = ("rho_f","/system/controlDict", "RRR", "LIST[1000; 1100; 1500]")
{3.3} = ("T_fluid","/0/fluid/T", "TTT","ODS['calculation.ods';2;('C',4);('C',4)]")
{3.3} = ("U", "/0/U", "BEHIND uniform (0 0 UNTIL ); //insert here", 1,2,3,4)
{3.3} = ("comment", "/system/controlDict", "AT_TOP", "//insert this via caseGen")
{3.3] = ("comment","", "", "text")
{3.3] = ("actual_solution_number","", "", "SOLUTIONNUMBER")
***explanation***
("rho_f","/system/controlDict", "RRR", 1000):
- Use a parameter called "rho_f" found in "/system/controlDict" of a fixed value
of 1000 by substitute "RRR" with the value.
("rho_f","/system/controlDict", "RRR", 1000, 1100, 1500):
- Like above but use more values (1000, 1100, 1500).
("rho_f","/system/controlDict", "RRR", "LIST[1000; 1100; 1500]"):
- Like above but uses a different syntax.
("T_fluid","/0/fluid/T", "TTT","ODS['calculation.ods';2;('C',4);('C',4)]"):
- Like above but get the values from a libre(open)-office-sheet.
("U", "/0/U", "BEHIND uniform ( UNTIL ); //insert here", 1,2,3,4):
- Insert in file '/0/U' of the individual created case-folder between 'uniform (' and ') //insert here'
the values '1' for the first solution, '2' for the second and so on.
- The result will be 'uniform ( 1 ) // insert here' in the first solution.
("comment", "/system/controlDict", "AT_TOP", "//insert this via caseGen"):
- Add a value to the beginning of the file.
("comment","", "", "text"):
- Because no parameter-source is defined this parameter won't edit a file.
- This option can be usefull e.g. when 'COMMANDS_to_start_case' has to vary in every solution (4.1 - functions)
("actual_solution_number","", "", "SOLUTIONNUMBER"):
- Defines the parameter "actual_solution_number" because of the function "SOLUTIONNUMBER" as named e.q. '1' or '2'
in the first or second solution.
- This option can be usefull is you e.g. want to specify the name of the gnuplot-file in (6.2)
------------------------------------------------------------------------------------------
{3.3.a}: your name for the parameter
------------------------------------------------------------------------------------------
***examples***
{3.3.a} = "rho_f"
------------------------------------------------------------------------------------------
{3.3.b}: location of the parameter-source in the generated case-folder
------------------------------------------------------------------------------------------
***examples***
{3.3.b} = "/system/controlDict"
{3.3.b} = ""
***requirements***
- The destination has to be writeable plain-text-document.
- If 3.3.b is empty no file will be written.
------------------------------------------------------------------------------------------
{3.3.c}: substitute-function or place holder in the parameter-source-file
------------------------------------------------------------------------------------------
***examples***
{3.3.c} = "XXX" OR "{something else}"
***available functions***
"AT_TOP": - Add value (3.3.d) to the beginning of the document (3.3.b).
"AT_BOTTOM": - Add value (3.3.d) at the end of the document (3.3.b).
"BEHIND {something}":
- Replace everything in line behind a freely defined placeholder {something}.
"BEHIND {something} UNTIL {something else}":
- Replace everything in behind {something} and {something else} if both found in a line
with the value defined in (3.3.d).
"{something else}":
- Everything which isn't a function like above will be interpreted as a placeholder.
- Which means replace every value of {something} with the value defined in (3.3.d).
***requirements***
- The placeholder has to explicit mark the place which has to be substituted.
Everything in the parameter-source-file containing "XXX" will be replaced.
------------------------------------------------------------------------------------------
{3.3.d}: parameter-value(s)
------------------------------------------------------------------------------------------
***examples***
{3.3.c} = 1000
{3.3.c} = 1000,1100,1500
{3.3.c} = "LIST[1000;1100;1500]"
{3.3.c} = "ODS['calculation.ods';2;('C',4);('C',4)]"
{3.3.c} = "uniform (0 ODS['calculation.ods';2;('C',4);('C',10)] ODS['calculation.ods';2;('D',4);('D',10)])"
{3.3.c} = "SOLUTIONNUMBER"
1000: - Use a fixed value of 1000.
1000,1100,1500:
- Use more values (in this case 1000,1100 and 1500)
"LIST[1000;1100;1500]":
- Same like above.
"ODS['calculation_CHT_laminarCrossflow_new_211111.ods';2;('C',4);('C',4)]":
- Use a function to get all the values.
"uniform (0 ODS['calculation.ods';2;('C',4);('C',10)] ODS['calculation.ods';2;('D',4);('D',10)])":
- Same as above. But now the result is
'uniform (0 {...value_of_first_ods_data} {...value_of_second_ods_data})'.
***available_functions***
"ODS[...]": - Get the values from a libre(open)-office-sheet.
- Find further information in chapter (F.1.b).
- The optional feature "CHANGED_BY_ROW" won't make sense and isn't allowed
here.
"LIST[x;y;z]": - Alternative syntax for 'x','y','z'
- LIST[] can also work with ranges, see (F.1.c)
- The optional feature "CHANGED_BY_ROW" won't make sense and isn't allowed
here.
"SOLUTIONNUMBER": - Get the number of the aktual solution e.g. 1 or 2 for the first or second solution.
***requirements***
- If there are more ODS[]-functions in one value then it's necessary that the range of values in every
ODS[]-function has the same length.
=========================================================================================
{4.1}: command to start the case by running the simulation-solver
=========================================================================================
***location***
COMMANDS_to_start_case = {"YOUR_COMMAND_TO_START_THE_CARE_OUT_OF_ITS_CASEFOLDER": 4.1}
***examples***
{4.1} = "icoFoam"
{4.1} = "PARAMETER[solver]"
{4.1} = "unset FOAM_INST_DIR; . /opt/openfoam200/etc/bashrc\npyFoamPlotRunner.py chtMultiRegionFoam"
{4.1} = "myCase=${PWD##*/};cd ..;qsub /app2/OpenFOAM/foam_galilei_start_serial.sh chtMultiRegionFoam $myCase"
***explanation***
"icoFoam": - Start the OpenFOAM-solver icoFoam in out of the case-folder
"unset FOAM_INST_DIR; . /opt/openfoam200/etc/bashrc\npyFoamPlotRunner.py chtMultiRegionFoam":
- Load OpenFOAM 2.0 and execute the solver chtMultiRegionFoam via pyFoamPlotRunner.py
(which let's you see the residua but requires pyFoam installed).
"myCase=${PWD##*/};cd ..;qsub /app2/OpenFOAM/foam_galilei_start_serial.sh chtMultiRegionFoam $myCase":
- Start a 'qsub'-cluster-controlling-script out of the folder above the individual-case-folder.
***available_functions***
"PARAMETER[{some name of 3.3.a}":
- This function substitudes the parameter-name written between [...] with its value
for the actual solution.
- This is usefull when e.g. you want to run a process in parallel and want to specify the number
ob processors with a parameter-name written in 3.3.a like:
COMMANDS_to_start_case = "qsub -pe openmpi PARAMETER[CPUs] icoFoam"
***requirements***
- 'caseGen' will create a shell-script (STARTCASE_via_caseGen.sh) in the
individual-created-case-folder in SOLUTION/(0.1)/(2.1)/ and start the case by
executing those script out of the folder.
- Therefore the command has to be shell-readable and based of the folder.
=========================================================================================
{4.2}: option whether start in an independent xterminal
=========================================================================================
***location***
start_case_in_independent_xterm = {"yes" OR "no": 4.2}
***examples***
{4.2} = "yes"
{4.2} = "no"
***usage***
"yes": - 'caseGen' will start the command in (4.1) by starting 'xterm'.
- This option allows you to see parallel running processes in individual terminal-windows'
As the 'x' in 'xterm' shows this option need an X-server (graphical interface) running.
"no": - 'caseGen' will start the command in (4.1) in the same terminal as 'caseGen' was started.
- This means that parallel-running-processes as chosen in (1.2) cannot by displayed but are
running in the background.
=========================================================================================
{5.1}: entries defining the results
=========================================================================================
***location***
OUTPUT = [{5.1},{}, ... {}]
***general***
{5.1} = ({name: 5.1.a}, {from_where: 5.1.b}, {interval: 5.1.c}, {which_dimensions: 5.1.d},
{optional: store values in ODS-file: 5.1.e})
***examples***
{5.1} = # Leave empty if you don't use the output-option.
{5.1} = ("zeta_c_mean", ["probes/cylinder/0/TMean", "EVERY 100 DECADE 10"], "CLASS_DIRECTORY",\
[("<TIME>", 1), ("<zeta>", 2)])
{5.1} = ("zeta_c_r1", ["surfaceSampling_cylinder/TIME_DIRECTORY/T_cylinder.raw","DECADE 10"], \
"SOLUTION_DIRECTORY",[("<theta>", 1),("<zeta>", 4),"<zeta_c_surface_mean>"])
{5.1} = ("residua", ["log.simpleMicroScalePorousFoam"], "SOLUTION_DIRECTORY",[("<time>","Time ="),\
("<Ux_error>",("Ux","Final residual =")),("<clockTime>","ClockTime ="),"TO_ODS")
***requirements***
At the moment 'caseGen' will only save those output-results with standard-python-precision.
This means that large numbers like 0.2445215423412412412478687676786 will be rounded to
0.24452154234. Therefore its wise to limit the decimal place to 11.
------------------------------------------------------------------------------------------
{5.1.a}: your name for the resulting-data-set (as file or folder)
------------------------------------------------------------------------------------------
***examples***
{5.1.a} = "wall_temperature"
{5.1.a} = "velocity_over_wall"
------------------------------------------------------------------------------------------
{5.1.b}: entries defining output-source
------------------------------------------------------------------------------------------
***general***
{5.1.b} = [{location: 5.1.b.1}] OR [{location: 5.1.b.1}, {interval: 5.1.b.2}] OR [{"NEW": 5.1.b.3}]
***examples***
{5.1.b} = ["probes/cylinder/0/TMean"] = [{5.1.b.1}]
{5.1.b} = ["probes/cylinder/0/TMean", "EVERY 100 DECADE 10"]= [{5.1.b.1}, {5.1.b.2}]
{5.1.b} = ["surfaceSampling_cylinder/TIME_DIRECTORY/T_cylinder.raw"]= [{5.1.b.1}]
{5.1.b} = ["NEW"] = [{5.1.b.3}]
...........................................................................................
{5.1.b.1}: location of the output-source in SOLUTION/(0.1)/(2.1)/INDIVIDUAL-GENERATED-SOLUTION-FOLDER/
...........................................................................................
***examples***
{5.1.b.1} = "probes/cylinder/0/TMean"
{5.1.b.1} = "surfaceSampling_cylinder/TIME_DIRECTORY/T_cylinder.raw"
{5.1.b.1} = "log.interFoam"
***requirements***
==> sorted-value-files (like probe-files):
- Those files have to be plain tables like the following:
*-------------------*
| # [x] [y] [z] |
| 1.567 3.56 10.456 | (1st. data-containing-row containing 3 output-dimensions)
| 1.634 2.4567 1.34 | (2nd. data-containing-row)
*-------------------*
- Lines which contain no or less data then the others or
which start with '#' will be ignored
==> UNsorted-value-files (like log-files):
- Those files has to contain one or more entries which define the following value e.g.:
"BiCGStab: Solving for Ux, Initial residual = 0.012, Final residual = 0.003, No Iterations 3"
- In this case 'Ux' together with 'Final residual = ' define the value 0.003
- Those files have a major loop in which all values replicate e.g. start and end at:
"Time = ..."
==> general:
- Possible methods to separate the data from each other are:
one or more spaces, tabs, commas or semicolons
- The data has to be written as python-readable 'floats' or 'integers'
***available_functions***
"TIME_DIRECTORY": - This function act as a placeholder when more files are in the directory.
- The names of these files have to be times e.g. "0.1234"
on what the containing datasets belong to
written as python-readable 'floats' or 'integers'
...........................................................................................
{5.1.b.2}: interval in which the data-sets of {5.1.b.1} has to be read-out
...........................................................................................
***examples***
{5.1.b.1} = "EVERY 100"
{5.1.b.1} = "EVERY 10 DECADE 10"
{5.1.b.1} = "DECADE 5"
{5.1.b.1} = "DECADE 5 IN 2"
***available_functions***
"EVERY {integer}": - take data every {integer} data-containing-rows
- e.g. when a contains 500 data-containing-rows and {integer} = 100
read-out the data from data-containing-rows 100, 200, 300, 400, 500
"DECADE {integer}": - read in every decade only {integer} data-containing-rows out
- this function is limited to sorted (ascending or dipping) data-sets
and to output-dimensions (5.1.d.1) of the first position
(except "IN" defines an other position) whose output-function (if set)
contains no cell-range-functions (CHAPTER!!!!!!)
"IN {integer}": - define the position of the output-dimension (5.1.d.2) for which "DECADE" relates to
- of "IN" isn't defined the first position of the output-dimensions will used
***explanation***
If large data-set are worked on the computing time can increase dramatically. Therefore its useful
to limit those sets by an interval. This is advised when working with more cases.
...........................................................................................
{5.1.b.3} = "NEW": create a new result_containing document
...........................................................................................
If a new document will be created no existing data-sets will be read-out.
Instead of this the output-dimensions (5.1.d) of this document has to be build by output-function (5.2).
------------------------------------------------------------------------------------------
{5.1.c}: directory where the created document will be saved
------------------------------------------------------------------------------------------
***examples***
{5.1.c} = "CLASS_DIRECTORY"
{5.1.c} = "SOLUTION_DIRECTORY"
***available_functions***
"CLASS_DIRECTORY": - the new document will be saved in SOLUTION/(0.1)/(2.1)/
"SOLUTION_DIRECTORY": - the new document will be saved in SOLUTION/(0.1)/(2.1)/INDIVIDUAL-GENERATED-SOLUTION-FOLDER/
------------------------------------------------------------------------------------------
{5.1.d}: name and position of existing or name of new output-dimensions
------------------------------------------------------------------------------------------
***general***
{5.1.d} = [({name: 5.1.d.1}, {position: 5.1.d.2}) OR {name: 5.1.d.3}, ...]
==> sorted files:
If you have a data-set like the following defined in (5.1.b.1)
*-------------------*
| # [x] [y] [z] |
| 1.567 3.56 10.456 | (1st. data-containing-row containing 3 output-dimensions)
| 1.634 2.4567 1.34 | (2nd. data-containing-row)
*-------------------*
you can read-out and name all or some of their output-dimension.
If you want to add additional output-dimension use (5.1.d.3).
***examples***
{5.1.d} = [("<TIME>", 1), ("<zeta>", 2)]
This read-out the existing data like this:
*-------------------*
| # <TIME]> <zeta> |
| 1.567 3.56 |
| 1.634 2.4567 |
*-------------------*
{5.1.d} = [("<theta>", 1),("<zeta>", 3),"<zeta_c_surface_mean>"]
This read-out the existing data like this:
*---------------------------------------------*
| # <theta> <zeta> <zeta_c_surface_mean> |
| 1.567 10.456 (new) |
| 1.634 1.34 (new) |
*---------------------------------------------*
==> unsorted files:
- now the position is phrase which stands directly infront of the value
- in case that those phase is not enough to define the value its possible to wrie down more phrases in a tuple
Example:
If you have a log like like the following with in (5.1.b.1)
*------------------------------------------------------------------------------------------*
| ... |
| Time = 1 |
| BiCGStab: Solving for Ux, Initial residual = 0.1, Final residual = 0.01, No Iterations 4|
| BiCGStab: Solving for Uy, Initial residual = 0.2, Final residual = 0.02, No Iterations 3|
| ... |
| pressure gradient = 9.82389 [0 1 -2 0 0 0 0] |
| ExecutionTime = 47.1 s ClockTime = 47 s |
| ... |
*------------------------------------------------------------------------------------------*
To read out the time-value and the pressure-gradient type:
{5.1.d} = [("<time>", "Time = "), ("<gradP>", "pressure = ")]
To read out the final residual of Ux type:
{5.1.d} = [("<Ux_error>", ("Ux","Final residual = "))]
- it's also possible to write more then two entries in the tuple.
general:
- The first entry starts the major loop and therefore sorts the following values.
(the pressure-gradient and the residua are sorted under the Time)
- The following entries has to be arranged in the same order of the output file.
But CAUTION:
- some value-defining phrases are not singular e.g. the "Time = " phase above.
- In this case the last value you read out is also the last value which comes infront of the new
starting-value e.g. "ClockTime = "
...........................................................................................
{5.1.d.1}: name of existing output-dimension
...........................................................................................
***examples***
{5.1.d.1} = "<zeta>"
{5.1.d.1} = "<velocity>"
{5.1.d.1} = "<TIME>"
***available_functions***
"<TIME>": - If an output-dimension is named like this document of "TIME_DIRECTORY" (5.1.b.1)
it can be allocated with output-functions (5.2) too.
- This function is limited to output-functions (if set) whose
contain no cell-range-functions (CHAPTER!!!!!!).
***requirements***
To define a beginning an an end of the dimension-name it is useful to use characters like '<' and '>'
...........................................................................................
{5.1.d.2} = {integer}: position of existing output-dimensions
...........................................................................................
Defines the position of the read-out output-dimension in an existing data-set like this:
*--------------------------------------------*
| # [first:1] [second:2] [third position: 3] |
| 1.567 3.56 10.456 |
| 1.634 2.4567 1.34 |
*--------------------------------------------*
...........................................................................................
{5.1.d.3}: add additional output-dimension
...........................................................................................
Those output-dimensions aren't reed-out from an existing document but were defined by an output-function in (5.2).
Currently those dimensions are located at the latest column of the generated data-set.
***examples***
{5.1.d.3} = "<zeta_mean>"
{5.1.d.3} = "<Nusselt_number>"
------------------------------------------------------------------------------------------
{5.1.e}: store all values in an open/libre-office-calc-file
------------------------------------------------------------------------------------------
***usuage***
{5.1.e} = #write the output to a plain text file
{5.1.e} = "TO_ODS" #the acording output of (5.1) will be stored in one ods-file as seperate sheet
=========================================================================================
{5.2}: define functions for the output defined in (5.1)
=========================================================================================
***location***
output_FUNCTIONS = [{5.2},{}, ... {}]
***general***
{5.2} = ({name: 5.2.a}, {function: 5.2.b})
***examples***
{5.2} = # Leave empty if you don't use the output-functions-option.
{5.2} = ("<zeta>", "(<zeta>-300)/100")
{5.2} = ("<TIME>", "<TIME>*2")
{5.2} = ("<theta>", "math.acos(<theta>*1000)")
{5.2} = ("<if_dtheta/dtau>", "IF[DELTA[<theta_TrIP>]/DELTA[<tau_TrIP>] == 0; ""; abs(DELTA[<theta_TrIP>]/DELTA[<tau_TrIP>])]")
{5.2} = ("<Nu_theta>", "-2/FOREIGN[zeta_c_mean; <zeta>; <tau>; ==; DOC_NAME] * <dzeta/dr>")
***explanation***
("<zeta>", "(<zeta>-300)/100"):
- Every entry in the generated data-set for every output-dimension in (5.1) named as <zeta> will be
diminished about 300 and divided by 100.
("<TIME>", "<TIME>*2"):
- Every entry in the generated data-set for every output-dimension in (5.1) named as <TIME> as well
as every time-separated output defined in (5.1.b.1) will be multiplied by 2.
("<if_dtheta/dtau>", "IF[DELTA[<theta_TrIP>]/DELTA[<tau_TrIP>] == 0; ""; abs(DELTA[<theta_TrIP>]/DELTA[<tau_TrIP>])]"):
- Every entry in the generated data-set for every output-dimension in (5.1) named as <if_dtheta/dtau> will be ''
if DELTA[<theta_TrIP>]/DELTA[<tau_TrIP>] == 0
(which means if (<theta_TrIP>(t=n) - <theta_TrIP>(t = n-1))/(<tau_TrIP>(t=n) - <tau_TrIP>(t = n-1)) will be zero)
else the entry will be the absolute value from above.
("<Nu_theta>", "-2/FOREIGN[zeta_c_mean; <zeta>; <tau>; ==; DOC_NAME] * <dzeta/dr>"):
- Every entry in the generated data-set for every output-dimension in (5.1) named as <Nu_theta> is -2 over the product
of <zeta> * <dzeta/dr>
(at which <zeta> comes from the data-set 'zeta_c_mean' under the condition that <tau> in the own data-set is equal
to the document-name of the files in zeta_c_mean/. So this 'foreign' <zeta> is taken at the same time which is called
<tau> in the 'own' data-set and is the document-title at the foreign data-set.
------------------------------------------------------------------------------------------
{5.2.a}: name if the output-dimension mentioned in (5.1) with has modified by a function
------------------------------------------------------------------------------------------
***examples***
{5.2.a} = "<zeta>"
{5.2.a} = "<velocity>"
{5.2.a} = "<TIME>"
***requirements***
The dimensions in (5.2.a) has to come from the dimensions in (5.1.d.1) and (5.1.d.3).
If dimensions of (5.1.d.3) aren't mentioned in (5.2.a) their value will be '' in the generated data-set.
------------------------------------------------------------------------------------------
{5.2.b}: functions for the in (5.2.a) named output-dimension
------------------------------------------------------------------------------------------
***examples***
{5.2.b} = "(<zeta>-300)/100"
{5.2.b} = "FOREIGN[zeta_c_mean; <zeta>;<tau>; CIRCA;<tau_Nu>]"
***usage***
There are 6 different types of functions which can be used (even nested):
==> general algebra:
- basic operations like "+", "-", "*" and "/" as well as round brackets are possible
==> implemented python functions:
- functions which have an integer as result like "abs()" for the absolute value
"min()" and "max()" for the minimal and maximal value are possible
==> functions from the python-math-library:
- functions like "math.cos()", "math.exp()" and "math.pi" are possible but have to be
defined by typing 'math.' at first.
==> in-cell-functions as described in (Z.1):
- "FOREIGN[]","ODS[]", "LIST[]" and are possible but have to be enclosed by quotation marks.
==> cell-range-functions as described in (Z.2):
- "DELTA[]", "MAX[]", "MIN[]", MEAN[], "IF[]" and "SUM[]" are possible, even nested!
Those functions have also to be enclosed by quotation marks.
==> value written in 3.3.d: "PARAMETER[{some name of 3.3.a}":
- This function substitudes the parameter-name written between [...] with its value
for the actual solution.
Output-functions can pretty fast get complex. If there's a defect in one function 'caseGen' will
either stop by printing an error or build an empty entry (especially when equations cannot be solved
e.g. when (5.2.b) results in "x/0", "x+''" or "DELTA['']"). If you want to look for an error in the generated
data-set set (6.4) to "no". This wont try to solve the last resulting equation of each entry of the data-set.
=========================================================================================
{5.3}: collect output from the generated data-sets over all solution of one 'class'
=========================================================================================
***location***
output_OVER_ALL_solutions = [{5.3},{}, ... {}]
***general***
{5.3} = ({output_name: 5.3.a}, {output_dimensions: 5.3.b}, {condition_to_take: 5.3.c})
***examples***
{5.3} = # Leave empty if you don't use the output-functions-option.
{5.3} = ("TrIP", ["<theta_TrIP>","<phi_TrIP>","<Henry_TrIP>"], "<if_dtheta/dtau> == MIN[<if_dtheta/dtau>]")
{5.3} = ("TrIP", ["<theta_TrIP>","<phi_TrIP>","<Henry_TrIP>"], "<if_dtheta/dtau> == MIN[<if_dtheta/dtau>]", "CHANGED_BY_ROW")
***explanation***
If you are interessted of output of all generated solutions in one 'class' generated by (5.1)
You can collect all or some of those output-dimensions in one file located in SOLUTION/(0.1)/(2.1).
If an old over-all-file exists only the data of the actual solution-step will be substituded.
("TrIP", ["<theta_TrIP>","<phi_TrIP>","<Henry_TrIP>"], "MIN[<if_dtheta/dtau>]"):
- Create a new data-set stored in SOLUTION/(0.1)/(2.1)/ named "TrIP".
- This file "TemeraturInversionPoints" collects the first value of the
dimensions <theta_TrIP>, <phi_TrIP>, <Henry_TrIP> of all case-ordered files of
the same name defined in (5.1) where <if_dtheta/dtau> is minimal.
("TrIP", ["<theta_TrIP>","<phi_TrIP>","<Henry_TrIP>"], "MIN[<if_dtheta/dtau>]", "CHANGED_BY_ROW"):
- Like the first example but with the option "CHANGED_BY_ROW" all lines ( and not only the first line)
which conform with the condition MIN[...] taken.
------------------------------------------------------------------------------------------
{5.3.a}: name of the output-dimension to collect from every case in class
------------------------------------------------------------------------------------------
***examples***
{5.3.a} = "TrIP"
***requirements***
- Because this function only compress existing data-sets his name has to come from the
output-names defined in (5.1.a)
------------------------------------------------------------------------------------------
{5.3.b}: list of the output-dimensions to collect from to take
------------------------------------------------------------------------------------------
***examples***
{5.3.a} = ["<theta_TrIP>","<phi_TrIP>","<Henry_TrIP>"]
***requirements***
- Because this function only compress existing data-sets his dimensions has to be
in the list of the dimensions (5.1.d) of the output-name (5.1.a) from one of the
output-names defined in (5.1.a).
- If ther's a 'new' over-all-dimension which isn't mentioned in (5.1) (thats necassary
for optimizing) a new (at first empty) dimension will be created.
------------------------------------------------------------------------------------------
{5.3.c}: condition to collect from the generated output named in (5.1.a)
------------------------------------------------------------------------------------------
***examples***
{5.3.c} = "<if_dtheta/dtau> == MIN[<if_dtheta/dtau>]"
{5.3.c} = "<if_dtheta/dtau> == MIN[<if_dtheta/dtau>]", "CHANGED_BY_ROW"
{5.3.c} = "<if_dtheta/dtau> > MIN[<if_dtheta/dtau>]+1 and <if_dtheta/dtau> < MAX[<if_dtheta/dtau>]-1", "CHANGED_BY_ROW"
***usage***
"<if_dtheta/dtau> == MIN[<if_dtheta/dtau>]":
- Collect the first value of the dimensions named in (5.3.b) of all case-ordered files of
the same name defined in (5.1) where <if_dtheta/dtau> is minimal.
"<if_dtheta/dtau> == MIN[<if_dtheta/dtau>]", "CHANGED_BY_ROW":
- Like the first example but with the option "CHANGED_BY_ROW" all lines (not only the first line)
which conform with the condition <if_dtheta/dtau> is MIN[<if_dtheta/dtau>] are taken.
"<if_dtheta/dtau> > MIN[<if_dtheta/dtau>]+1 and <if_dtheta/dtau> < MAX[<if_dtheta/dtau>]-1", "CHANGED_BY_ROW":
- Take every value of <if_dtheta/dtau> which is bigger than its minimum+1 and lower than its maximum-1.
--> 'caseGen' proves the whole string whether it's true. Therefore its also possible to type in more complex conditions.
***requirements***
Logical conditions can be build by the following options. It's also possible to build more complex conditions
by using more than one logic operators.
==> general algebra:
- basic operations like "+", "-", "*" and "/" as well as round brackets are possible
- basic logic operators like "==" (equal to), "<" OR ">" (smaller OR bigger then)
"<=" OR ">=" (smaller OR bigger or equal to)
==> implemented python functions:
- functions which have an integer as result like "abs()" for the absolute value
"min()" and "max()" for the minimal and maximal value are possible
==> functions from the python-math-library:
- functions like "math.cos()", "math.exp()" and "math.pi" are possible but have to be
defined by typing 'math.' at first.
==> cell-range-functions as described in (Z.2):
- "DELTA[]", "MAX[]", "MIN[]", MEAN[], "IF[]" and "SUM[]" are possible.
Those functions have also to be enclosed by quotation marks.
=========================================================================================
{5.4}: use last generated output when source didn't changed
=========================================================================================
***location***
reuse_output_from_same_sources = {"yes" OR "no": 5.4; 'no'}
***examples***
{4.2} = "yes"
{4.2} = "no"
**usuage***
"yes": - If the output-source (5.1.b) didn't changed since the last run of caseGen
(which is checked with a md5sum - fingerprint and stored in the file
FINGERPRINTS_by_caseGen) its promised that the last generated output wont change.
Therefore it will be reused.
- Choosing 'yes' may help to fasten up the process of collecting and analyzing output.
"no": - The output of 5.1 will always recalculated.
=========================================================================================
{6.1}: define optimizing-functionality
=========================================================================================
***location***
OPTIMIZE_from_over_all_to_parameters = [ = [{6.1},{}, ... {}]
***general***
{6.1} = ({condition: 6.1.a},{maximum error: 6.1.b},{algorithm: 6.1.c},{algorithm-variable: 6.1.d},
[
{entries-defining-optimize-parameters: 6.1.e},{...},{...}
], {starting-manner: 6.1.f}),
***example***
{6.1} = ("<result2> == 10",1e-4,"TENTACLE","SPLINE",
[
("<opti_result2_1>",(1,4),2),
("<opti_result2_2>",(0,4),0.5),
], "NEW"),
***explanation***
In 'caseGen' it is possible to optimize an output-value by adaption of one OR MORE input-parameters
EVEN without the knowledge of the functional relationship between those parameters!
The standard-procedure works like this:
At the beginning:
1.) The entry-function in (3.3) 'OPTIMIZED[{optimizing-parameter}]' will be substituded by the
start-value of those {optimizing-parameter} named in (5.3) and defined in (6.1.e).
2.) Those start-values will infuluence the output-value which has to be optimized.
Therefore those {output-value} is mentioned as dimension in (5.1) and catched as dimension
of an over-all-output in (5.3). A condition (6.1.a) of those {output-parameter} like
e.g. '<temperature> == 400' or '<resistance> == MIN' defines the intent of the optimization.
3.) In an optmization-algorithm defined in (6.1.c) all {optimization-parameter} will be varied according
to the condition.
Every following step:
1.) The entry-function in (3.3) 'OPTIMIZED[{optimizing-parameter}]' will be substituded by the
last value varied by 'caseGen' in the step before.
At the moment it's not possible run more cases in parallel (1.2 > 1) but I'm on it!
Example:
................................................
("<result2> == 10",1e-4,"TENTACLE","SPLINE", .
[ .
("<opti_result2_1>",(1,4),2), .
("<opti_result2_2>",(0,4),0.5),.
], "NEW"), .
................................................
- In this case the over-all-dimension "<result2> has to be '10'.Including the tollerated error of 1e-4
the optimizing process stopps when <result2> becomes something between 9.9999 and 10.0001.
- The algorithm for this prozess is the 'TENTACLE' algorithm wherat each generated 'tentacle'
(which is a polynom build along a fixed relation between every o.-parameter) has a maximum degree of 2.
- Two parameters (<opti_result2_1> and <opti_result2_2>) are influencing <result2> this makes the optimizing
problem 2-dimensional.
- Each parameter has a range of values beween he can be varied. In this example 1 to 4 and 0 to 4.
- The start-value (for the first procedure-step at the beginning) is 2 and 0.5.
- The optional "NEW" at the end of every (6.1)-substitude tells 'caseGen' don't to look for existing values of
older calculations in the generated over-all-file.
***requirements***
Both the optimizing-value (e.g. <result2>) and every o.-parameter (e.g. <opti_result2_1>) has to be unique in the
CONTROLDICTS-file and has to be mentioned in the over-all-output in (5.3) as dimension.
------------------------------------------------------------------------------------------
{6.1.a}: condition for optimizing
------------------------------------------------------------------------------------------
***examples***
{6.1.a} = "<result2> == 10"
{6.1.a} = "<result2> << 10"
{6.1.a} = "<result2> >> 10"
{6.1.a} = "<result2> == MIN"
{6.1.a} = "<result2> == MAX"
***usuage***
"<result2> == 10":
- <result2> has to be 10.
"<result2> << 10":
- <result2> has to lower than 10.
"<result2> >> 10":
- <result2> has to higher than 10.
"<result2> == MIN":
- <result2> has to be minimal.
"<result2> == MAX":
- <result2> has to be maximal.
------------------------------------------------------------------------------------------
{6.1.b}: maximum error for the condition-value
------------------------------------------------------------------------------------------
***examples***
{6.1.b} = 1e-6
{6.1.b} = 0.5
***usage***
0.5: - The condition-value (e.g. 10) can be between 9.5 and 10.5 to stop the optimizing-process.
For MIN an MAX optimizations the condition to abort the process is build as following:
- The difference between the two best results has to be lower than the error AND the difference
between the 10th-best and the best result has to be lower than 10*error.
------------------------------------------------------------------------------------------
{6.1.c}: optimizing-algorithm
------------------------------------------------------------------------------------------
***examples***
{6.1.c} = "TENTACLE"
***usage***
"TENTACLE":
- At the moment this algorithm is the only one implemented in 'caseGen'.
- It tries to find the right values for the o.-parameters be building 'tentacles'
which means vectors which are representing the same ratio between every o.-parameter
starting at the start-point of every o-parameter.
- 'caseGen' now look how the o.-value varie along those vector and try to biuld a polynom
via regression-analysis.
- If 'caseGen' surely knows thaat along those 'tentacle' the condition cannot be fulfilled
it creates a new orthogonal 'tentacle'.
- If it isn't possible to build new orthogonal 'tentacles' 'caseGen' tries to build new
tentacles as function of existing 'tentacles'.
------------------------------------------------------------------------------------------
{6.1.d}: algorithm-variable
------------------------------------------------------------------------------------------
***examples***
{6.1.d} = 2 # OR 3,4,5 ..
{6.1.d} = "n"
{6.1.d} = "SPLINE"
***usage***
some INTEGER e.g. 2: - When (6.1.c) is "TENTACLE" every 'tentacle' (polynom) has a maximal degree of 2
"n": - '' '' '' '' '' depending
on the ammound of points in the 'tentacle'
"SPLINE": - Every tentacle is a spline based on every existing point
(drawn via scipy.interpolate.InterpolatedUnivariateSpline)
------------------------------------------------------------------------------------------
{6.1.e}: entries-defining-optimize-parameters
------------------------------------------------------------------------------------------
***general***
{6.1.e} = ({optimizing-parameter: 6.1.e.1},{parameter-range: 6.1.e.2},{parameter-start: 6.1.e.3})
***examples***
{6.1.e} = ("<opti_result2_1>",(1,4),2)
***explanation***
("<opti_result2_1>",(1,4),2):
- The optimizing-parameter <opti_result2_1> can vari between 1 and 4 starting with 2.
------------------------------------------------------------------------------------------
{6.1.f}: starting-manner for the optimizing-process
------------------------------------------------------------------------------------------
***examples***
{6.1.f} = ""
{6.1.f} = "NEW"
***usage***
"":
- At the beginning of the optimizing-process 'caseGen' will look whether there are older
data-sets in the related over-all-output that can be used for the o.-process.
"NEW:
- Opposite of aboth.
=========================================================================================
{6.2}: plot defined over-all-output with gnuplot
=========================================================================================
***location***
PLOT_over_all_output = [{6.2}]
***example gnuplot-commands***
{6.2} = "plot 'zeta_z_mean'"
{6.2} = "splot sin(x)*y"
{6.2} = "set term dumb; plot 'zeta_z_mean' using 1:2"
{6.2} = "splot 'optimizing_radius' using 1:2:3:4 with points palette"
{6.2} = "splot '2d' using 3:4:2,'2d_FITTING_APPROACH' using 2:3:1"
***explanation***
"plot 'zeta_z_mean'":
- Plot the first two dimensions of the over-all-output-file "zeta_z_mean" (defined in (5.3))
graphically via the third-party-software 'gnuplot'.
"splot sin(x)*y":
- Plot the function "sin(x)*y" in 3D with 'gnuplot'.
"set term dumb; plot 'zeta_z_mean' using 3:4":
- In opposite to the examples above this plot don’t need a graphical environment.
The option "set term dump" allows you to watch 2d- and 3d-plots in an ASCI-style direct
in your terminal. Certainly in every solution-step a new plot will be drawn.
- With "using 3:4" you choose the 3. and 4. dimension in the file "SOLUTION/(2.1)/zeta_z_mean"
to plot.
"splot 'optimizing_radius' using 1:2:3:4 with points palette":
- Its hardly possible to draw a 4-dimensional data-set by using different colours.
In this case the last (4.) column is shown as a painted dot.
"splot '2d' using 3:4:2,'2d_FITTING_APPROACH' using 2:3:1":
- Plot the 2nd,3rd and 4rd dimension of the files '2d' AND '2d_FITTING_APPROACH'. For plotting more
graphs use ',' .
***usage***
At the end of every processing step of 'caseGen' the command (6.2) generates a plot and (if existing)
overrides the old plot. This option is very important if you want to have a review on the generated
over-all-output in (5.3) e.g. because of an optimization-process (described in XXXXXXX).
***available_functions***
"PARAMETER[{some name of 3.3.a}":
- This function substitudes the parameter-name written between [...] with its value
for the actual solution.
- This is usefull when e.g. you want to run a process in parallel and want to specify the number
ob processors with a parameter-name written in 3.3.a like:
" ... set title 'NACA4-PARAMETER[m]-PARAMETER[p]-13-Profile"
***requirements***
To get plots you need to have the program 'gnoplot' (http://www.gnuplot.info/) installed.
If you don't use the feature "set term dumb" you need a graphical environment running (f.e. X11).
Those command-strings of (6.2) need to be enclosed by "...", over-all-files need to be enclosed by
'...'.
***further help***
Contrary to expectations 'gnuplot' is pretty simple to use. The following sites can be helpful
to learn about the most important features:
http://www.cs.hmc.edu/~vrable/gnuplot/using-gnuplot.html
http://www.gnuplot.info/help.html
http://www.duke.edu/~hpgavin/gnuplot.html
=========================================================================================
{6.3}: clustering coefficient for over-all-output to optimize
=========================================================================================
***location***
clustering_coefficient = {SOME INTEGER: 6.3; 500}
***examples***
{6.3} = 10
{6.3} = 500
{6.3} = 1000
***explanation***
The clustering coefficient is the relation of the maximum distance to the their respective
distance of all points build by an optimizing-parameter and the optimize-condition.
If the relative distance between two or more points is higher then the clustering_coefficient
those points are located in a cluster.
Simulation-errors can give those clustered points a wrong position so that a (spline)-interpolation
get an unrealictic shape. To prevent this every point in a cluster will averaged to one point.
The second function of this variable is to go to a new OPTIMIZED[point] which has the maximum
distance to alle existing point when the last three points are similar located, which will be
evaluated by the clustering_coefficient too.
=========================================================================================
{6.4}: calculate the resulting output in the generated data-sets
=========================================================================================
***location***
calculate_collected_output = {"yes" OR "no": 6.4}
***examples***
{6.4} = "yes"
{6.4} = "no"
***usage**
"yes": - Every value in the generated data-sets will be calculated. That's the standard.
(calculation means f.e. the following: "(3+4)/2)" = "3.5")
"no": - If values are '' in the generated data-sets or have unrealistic values choose this
for debug your composed functions in (5.2) or to debug 'caseGen'.
=========================================================================================
{6.5}: delete the parameter-sources named in (5.1.b) after create the resulting data-sets
as defined in (5.1) and (5.2)
=========================================================================================
***location***
delete_parameter_source_after_processing = {"yes" OR "no": 6.5}
***examples***
{6.5} = "yes"
{6.5} = "no"
***usage**
"yes": - As soon a the new data-sets as defined in (5.2) are created their source will
be deleted.
"no": - The parameter-source won't be deleted.
***requirements***
This option will be ignored if collect_output(1.3) = "no".
=========================================================================================
{6.6}: delete the whole individual solution after its output is processed
=========================================================================================
***location***
delete_every_last_solution = {"yes" OR "no": 6.6}
***examples***
{6.6} = "yes"
{6.6} = "no"
***usage**
"yes": - If only need the last solution created by 'caseGen' or the over-all-output(5.3)
the recent solutions you can let 'caseGen' delete every old solution.
"no": - The generated solutions won't be deleted.
***requirements***
This option will be ignored if collect_output(1.3) = "no".
=========================================================================================
{F.1}: in-cell-functions
=========================================================================================
These function are only accorded to those cells in which they are. Its noch possible
to nestle those functions into each other but to set then in serial like e.g. "FOREIGN[...] + ODS[...]".
***available_functions***
"FOREIGN[{F.1.a}]": - get 'foreign' values from other generated data-sets
"ODS[{F.1.b}]": - get values from a libre-(open)-office-sheet
"LIST[{F.1.c}]": - get values from a list of values
------------------------------------------------------------------------------------------
FOREIGN[{F.1.a}]
------------------------------------------------------------------------------------------
***general***
FOREIGN[{F.1.a}] = FOREIGN[{foreign_name: F.1.a.1};{foreign_dimension: F.1.a.2};{condition: F.1.a.3}]
***example***
FOREIGN[zeta_f_r1-closer; <zeta>; DOC_NAME; ==; DOC_NAME; CHANGED_BY_ROW]
***explanation***
Gives out the value(s) of a {foreign_dimension: F.1.a.2} as located in {foreign_name: F.1.a.1}
if a {condition: F.1.a.3} is fulfilled.
Let's say you have values in an other dataset.
Maybe you solver created several files for e.q. you mapped surfaceTemperature and and your surfacePressure.
For some reason you need to create a parameter which combines the surfaceTemperature to its -pressure.
Therefore you have to give caseGen some information about the criteria which combines your temperature to
your pressure.
Let's say your two files called 'TSf' and 'pSf' looks something like...
'TSf'
*--------------------*
| <TIME> <meanTSf>
......................
'pSf'
*--------------------*
| <TIME> <meanpSf>
......................
Now you created an new output-file which takes input from your 'TSf' file (see [5.1]).
Your <meanpSf>-values now are the foreigners in this dataset.
To get them into you file type:
FOREIGN[pSf; <meanpSf>; <TIME>; ==; <TIME>; CHANGED_BY_ROW]
--> Get all values of <meanpSf> (whose change by every row) in the file 'pSf' where the condition - in this case the equal time-value is fulfilled.
Sometimes you have strange datasets where one file listes every time whith every value you need and one other file saves your values seperated by there corresponding time alway in a new file. In this case your condition can be something like:
"DOC_NAME; ==; <TIME>"
Or if sadly your timeformat in the one file is fines than in the other file (e.g. 1.02s to 1.0195s) type this:
"DOC_NAME; CIRCA; <TIME>"
...........................................................................................
{F.1.a.1}: name of the 'foreign'-data_set named in (5.1.a)
...........................................................................................
***examples***
{F.1.a.1} = zeta_f_r1-closer
***usage***
This names the data-set from which the 'foreign' value comes from.
***requirements***
The name has to be one of the names set in (5.1.a)
...........................................................................................
{F.1.a.2}: take values from which dimension of the 'foreign' data-set named in (F-1.a.1)
...........................................................................................
***examples***
{F.1.a.1} = <zeta>
{F.1.a.1} = <TIME>
***usage***
This names the dimension from whose the focussed values has to come from.
***requirements***
This dimension has to be mentioned in the output-dimensions (5.1.d) named in (F.1.a.1).
...........................................................................................
{F.1.a.3}: condition which choose the taken values from the dimension of the 'foreign' data-set named in (F.1.a.1)
...........................................................................................
***general***
{F.1.a.3} = {foreign-dimension: F.1.a.3.1}; {logic_operation: F.1.a.3.2}; {own-dimension: F.1.a.3.3} OR
{F.1.a.3} = {F.1.a.3.1}; {F.1.a.3.2}; {F.1.a.3.3}; {CHANGED_BY_ROW: F.1.a.3.4}
***examples***
{F.1.a.3} = <Nu_theta>; <; 0
{F.1.a.3} = <tau>; CIRCA;<tau_Nu>
{F.1.a.3} = <tau>; ==; DOC_NAME
{F.1.a.3} = DOC_NAME; ==; DOC_NAME
{F.1.a.3} = <zeta>; <; 300; CHANGED_BY_ROW
***explanation***
<Nu_theta>; <; 0:
- Get the first value (of the 'foreign' dimension named in (F.1.a.2)) where the 'foreign' dimension
<Nu_theta> (located in (5.1.d) named by (F.1.a.1)) is lower than zero.
<tau>; CIRCA;<tau_Nu>:
- Take the first value where the 'foreign'-<tau> is equal to the 'own'-<tau_NU>
(at which <tau> and <tau_Nu> are rounded to the same amount of decimal places).
F.e: the condition is fulfilled then <tau> = 0.001 and <tau_nu> = 0.0012343 or reversed.
<tau>; ==; DOC_NAME:
- Take the first value where the 'foreign'-<tau> is equal the name name of the 'own_document.
- Is is reasonable if (5.1.b.1) contains the "TIME_SEPARATED" entry.
<zeta>; <; 300; CHANGED_BY_ROW:
***available_functions***
--> {foreign-dimension: F.1.a.3.1}
'DOC_NAME': - Name of the 'foreign'-document
--> {logic_operation: F.1.a.3.2}
'CIRCA': - Round 'foreign' own 'own' dimension to the same amount of decimal places then like '=='
basic logic operations like:
'==': - Equal to.
'!=': - Not eaul to.
'<' OR '>': - Lower or higher then.
--> {own-dimension: F.1.a.3.3}
'DOC_NAME': - Name of the 'own'-document
--> {CHANGED_BY_ROW: F.1.a.3.4}
'CHANGED_BY_ROW': - Take the value of every line in which the condition is fulfilled.
------------------------------------------------------------------------------------------
ODS[{F.1.b}]
------------------------------------------------------------------------------------------
***general***
ODS[{F.1.b}] = ODS[{ods_location: F.1.b.1};{sheet_number: F.1.b.2};{from_to_range: F.1.b.3}]
***example***
ODS[{Z.1.b}] = ODS['calculation_CHT_laminarCrossflow_new_211111.ods' ; 2; ('E',495); ('E', 495)]
ODS[{Z.1.b}] = ODS['calculation_CHT_laminarCrossflow_new_211111.ods' ; 2; ('E',495); ('G', 656);CHANGED_BY_ROW]
***explanation***
- Gives out the value of a cell or cell-range named in (F.1.b.3) as a sheet named in F.1.b.2)
whereby the first sheet is the document is named as 1 and so on. The location of the ods-File
is named in (F.1.b.1) is taken in relative from the main 'caseGen/'-folder. If you only references one cell
like '('E',495); ('E', 495)' its value wont change for all solutions.
- If you want that the value of this function not only varies with every case but also in every line of the
generated data-set type ';CHANGED_BY_ROW' at the end of the ODS[]-function.
***requirements***
This function only can take values from openOFFICE- or libreOFFICE-calc-files (whose ends with *.ods).
If the content of the cells in the ods-sheet use functions (f.e. "=B3*4") then you have to copy the result of
everything by the option [ctrl+c] --> [ctrl+shift+v] "paste only letters and numbers" in a new sheet.
Else ODS[]-would gives out only those functions and NOT the results.
------------------------------------------------------------------------------------------
LIST[{F.1.c}]
------------------------------------------------------------------------------------------
***general***
LIST[{F.1.c}] = LIST[{list_values: F.1.c.1}] OR LIST[{list_values: F.1.c.1};{CHANGED_BY_ROW: F.1.c.2}]
***example***
LIST[{F.1.c}] = LIST[100;200;400;1;2.45;1.345;0;2]
LIST[{F.1.c}] = LIST[100:200:51]
LIST[{F.1.c}] = LIST[100;200;400;1;2.45;1.345;0;2;CHANGED_BY_ROW]
***explanation***
- Gives out the value of the LIST[] whereby the index in the list is equal to the actual-solution-number.
LIST[START:END:SPEPS] e.q. LIST[100:200:51]:
- build a list from START to END with a defined number of SPEPS between START and END
- LIST[100:200:51] ==> [100,102,104,...,198,200]
- this option can be combined in any order with other values like:
LIST[1:20:5;40;50;60:100:4]
"CHANGED_BY_ROW" at the end of a list function:
- the value of a list changes with every line in a output file and not with the solution-number
***requirements***
Every value of the LIST[]-function has to be separated with a ';'.
=========================================================================================
{F.2}: cell-range-functions
=========================================================================================
These function are accorded to every value of the dimension in which they are mentioned.
Its possible to nestle them like f.e. "DELTA[IF[MEAN[...]...]...]".
***available_functions***
"IF[{F.2.a}]": - Choose whether to to one thing or its alternative.
"MAX[{F.2.b}]": - Gives out the maximum value of every value of the dimension which
substitutes (F.2.b).
"MIN[{F.2.c}]": - Gives out the minimum value of every value of the dimension which
substitutes (F.2.c).
"MEAN[{F.2.d}]": - Gives out the mean (or average) value of every value of the dimension which
substitutes (F.2.d).
"SUM[{F.2.e}]": - Gives out the sum of every value of the dimension which
substitutes (F.2.e).
"DELTA[{F.2.f}]": - Gives out the difference value of every value with every value earlier value
of the dimension which substitutes (F.2.f).
- Gives out "" for the first value of a data-set.
***requirements***
Except of IF[] every substitute of (F.2.X) has to be a dimension-name of the output-name mentioned in (5.1)
in which the dimension including this function is located.
------------------------------------------------------------------------------------------
IF[{F.2.a}]
------------------------------------------------------------------------------------------
***general***
IF[{F.2.a}] = IF[{condition: F.2.a.1}; {original: F.2.a.2}; {alternative: F.2.a.3}]
***example***
IF[<theta> > 0; <theta>; '']
IF[<theta> == MIN[<theta>] + 1; 1;0]
If a condition (F.2.a.1) is fulfilled gives out value of (F.2.a.2) else (F.2.a.3).
***requirements***
(F.2.a.2) and (F.2.a.3) can be full featured output-functions like in (5.2.b), fixed values or
empty by typing '' or '-'. Typing "" wont work because the whole expressions is formatted as string and is
therefore surrounded by "...".