Skip to main content

optimate - parameter optimizer for different material models

Project description

Optimate Build Version GitHub Release

Optimate is an automatic parameter optimizer for different material models with the ability to optimize creep and relaxation experiments simultaneously. It utilizes minimization algorithms, such as Nelder-Mead and L-BFGS-B.

Getting Started

Prerequisites

Minimum requirement to run Optimate is python v3.8.3 or higher and the following python libraries:

  • numpy (v1.21.5 or higher)
  • scipy (v1.8.0 or higher)
  • pandas (v1.4.1 or higher)
  • matplotlib (v3.5.1 or higher)

Data Files and Naming Convention

The experimental data must be .dat (tab separated) file(s). For creep and relaxation experiment, the headers of the .dat must be time, strain, stress, & temperature. For the initial guess file, the headers of the .par must be temperature, E, and the all the material model parameters respectively. For example, the files present in the Data/ folder of the master branch can be seen.

For the creep and relaxation data files, a naming convention is set which should be strictly followed to ensure smooth running of the program:

  1. For creep experiments, the naming convention is:
    Convention: CreSampleName_Stress_Temperature.dat
    Example : CreBDY55z2_280_550.dat (For sample BDY55z2 at 280 MPa stress and 550 degree Celsius temperature)

  2. For relaxation experiments, the naming convention is:
    Convention: RelSampleName_Strain_Temperature.dat (Note: Strain/1000 is the actual strain of experiment)
    Example : RelBDY55re1_2_550.dat (For sample BDY55re1 at 0.002 strain and 550 degree Celsius temperature)

  3. For initial guess file, the naming convention is:
    Convention: SamplePfz_initial_guess_material-model.par
    Example : BDY_initial_guess_nb.par

Material-Model Key: Norton-Bailey 'nb'.

NOTE: Time is in hours, Stress is in MPa, Strain is unitless, Temperature is in degree Celsius, Weight is unitless and Young's Modulus is in MPa in the data files.
Also: For complete and detailed file and naming convention, please see the user manual.

Installation

Install optimate, using pip:

pip install optimate

Usage

The data (experiment files and the initial guess file) in the format and convention as mentioned in the user manual are to be put together.

For using optimate, just browse to the folder containing the data and run:

optimate [options]

Results will be saved in current working directory in the folder OptimateResults.

NOTE: It is possible to optimize multiple experiments for the same temperature. Please make a separate data file for every experiment following the naming convention.

Example optimate -e CreBDY55z11_250_550.dat CreBDY55z10_205_550.dat -o nm -m nb

            
Arguments:
----------
optional arguments:
      -h, --help            show this help message and exit
      -e EXPERIMENT [EXPERIMENT ...], --experiment EXPERIMENT [EXPERIMENT ...]
                            experiment(s) to be optimized
      -o {nm,bfgs}, --optimizer-method {nm,bfgs}
                            optimizer method for the optimizer
      -m {nb,gf,kora,mgf,tkora,rkora}, --material-model {nb,gf,kora,mgf,tkora,rkora}
                            material model to be optimized
      -w WEIGHT_EXP [WEIGHT_EXP ...], --weight-exp WEIGHT_EXP [WEIGHT_EXP ...]
                            weight w.r.t. experiments (in descending order of stress and/or strain)
      -W WEIGHT_TIME [WEIGHT_TIME ...], --weight-time WEIGHT_TIME [WEIGHT_TIME ...]
                            weight w.r.t. time intervals (for 1-10 hrs : 10-MaxTime hrs)
      -c, --convert-unit    convert time unit from hours to seconds
      -p, --plot            save plot(s)
      -t PLOT_TIME, --plot-time PLOT_TIME
                            maximum time value for plotting
      --pic-format {pdf,png}
                            plot picture format, default 'pdf'
      --opti-mode {strain,rate}
                            mode of comparison between experiment and simulation for the residual function, default 'strain'
      --error {mape,mase}   error definition used in the residual function, default 'mase'
      --error-scale {log,lin}
                            scale of optimization in the residual function, default 'log'
      --timeout TIMEOUT     Maximum allowed time (in seconds) for optimization, default 3600 sec
      --max-iter MAX_ITER   Maximum iterations allowed for optimization, default 10000
      -v, --version         display version information

Results will be saved in current working Directory in the OptimateResults folder). The optimized parameters are also generated as a .par (tab separated) file.

Changelog

Please read CHANGELOG.md for details on the features added and updated during subsequent versions.

Versioning

I am using SemVer for versioning. For the versions available, see the tags on this repository.

Author

Optimate is written by Muhammad Mohsin Khan (mohsin.khan1@outlook.com).

License

Optimate is licensed under MIT License (see the LICENSE.md file for details).

Project Status

Optimate is currently under development.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

optimate-0.0.1.tar.gz (17.3 kB view details)

Uploaded Source

Built Distribution

optimate-0.0.1-py3-none-any.whl (18.4 kB view details)

Uploaded Python 3

File details

Details for the file optimate-0.0.1.tar.gz.

File metadata

  • Download URL: optimate-0.0.1.tar.gz
  • Upload date:
  • Size: 17.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/34.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.54.1 importlib-metadata/4.8.2 keyring/23.4.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.8.12

File hashes

Hashes for optimate-0.0.1.tar.gz
Algorithm Hash digest
SHA256 5b1ca2e07c519a030e75c7205d441feb8a3a40206a13463747865c059d147437
MD5 d8d3a986462af32ec972b2b1c4678992
BLAKE2b-256 db843c8179580bde9f532acef11d94aa4823e2acf36f1eb2d98cdad2f39d7589

See more details on using hashes here.

File details

Details for the file optimate-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: optimate-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 18.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/34.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.54.1 importlib-metadata/4.8.2 keyring/23.4.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.8.12

File hashes

Hashes for optimate-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 d5752a9dbb635c852f65a7cbae5c7e21db4634558812437bace8495787ad4912
MD5 65d9c57258ed2a4ee7c3cc4aba18ffff
BLAKE2b-256 3f34a23d6e2fc717753ed598b69d1b150cc8ac94756d4c9dea1aaa9a6ac46497

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page