Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP: Python API to PROCESS #2616

Merged
merged 74 commits into from
Oct 4, 2023
Merged

Conversation

CoronelBuendia
Copy link
Contributor

@CoronelBuendia CoronelBuendia commented Sep 15, 2023

Linked Issues

Closes #1685
Closes #151

Description

Interface Changes

Checklist

I confirm that I have completed the following checks:

  • Tests run locally and pass pytest tests --reactor
  • Code quality checks run locally and pass flake8 and black .
  • Documentation built locally and checked sphinx-build -W documentation/source documentation/build

@CoronelBuendia CoronelBuendia requested review from a team as code owners September 15, 2023 08:09
@CoronelBuendia CoronelBuendia changed the title Fix PROCESS run for EU-DEMO WIP: Fix PROCESS run for EU-DEMO Sep 15, 2023
@je-cook je-cook requested a review from a team as a code owner September 20, 2023 09:22
@CoronelBuendia CoronelBuendia changed the title WIP: Fix PROCESS run for EU-DEMO WIP: Python API to PROCESS Sep 28, 2023
@CoronelBuendia CoronelBuendia added codes Tasks relating to integration of external codes usability Tasks relating to usability issues / improvements labels Sep 29, 2023
@CoronelBuendia CoronelBuendia added this to the Version 1.7.0 milestone Sep 29, 2023
Copy link
Contributor

@je-cook je-cook left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think they're all typing or immutability changes. Overall happy though

bluemira/codes/process/_inputs.py Outdated Show resolved Hide resolved
return "cost_model"

TETRA_1990 = 0
KOVARI_2015 = 1
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I know that there are other cost models that can be dynamically plugged in. I suppose in that case we'd expect the user to overwrite this Enum. I can't think of a nicer way but its messy as inheritance doesnt work for enums eg:

class ExtendedCostModel(PROCESSModel):
    @classproperty
    def switch_name(self) -> str:
        """
        PROCESS switch name
        """
        return "cost_model"

    TETRA_1990 = 0
    KOVARI_2015 = 1
    EXTRA = 2

import bluemira.codes.process._model_mapping as mm
mm.CostModel = ExtentedCostModel

this is for if anyone comes looking later than anything to do right now

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, this looks like a workable solution, and probably in the meantime PROCESS will evolve to be to accommodate custom models / constraint equations / objective functions dynamically somehow.

For now, we just need a Python API to what is actually there.

bluemira/codes/process/template_builder.py Outdated Show resolved Hide resolved
bluemira/codes/process/template_builder.py Outdated Show resolved Hide resolved
eudemo/eudemo/radial_build.py Outdated Show resolved Hide resolved
bluemira/codes/process/_equation_variable_mapping.py Outdated Show resolved Hide resolved
bluemira/codes/process/template_builder.py Outdated Show resolved Hide resolved
bluemira/codes/process/template_builder.py Outdated Show resolved Hide resolved
bluemira/codes/process/template_builder.py Outdated Show resolved Hide resolved
bluemira/codes/process/_equation_variable_mapping.py Outdated Show resolved Hide resolved
@sonarcloud
Copy link

sonarcloud bot commented Oct 4, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 2 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@je-cook
Copy link
Contributor

je-cook commented Oct 4, 2023

the test failures look like my fault, I'll go fix them

@je-cook je-cook merged commit 02f2a42 into je-cook/process_v3_upgrade Oct 4, 2023
2 of 3 checks passed
@je-cook je-cook deleted the matti/fix-EUDEMO-run branch October 4, 2023 10:01
je-cook added a commit that referenced this pull request Oct 16, 2023
* 👽️ Data removal/moved

* 👽️ Non existant filepath changed

* add NLopt version correction to install-process.sh

* fix PROCESS radial build plot

* fix PROCESS plotting better

* first pass PROCESS inputs

* first pass PROCESS inputs

* formatting

* finish constraint equations

* iteration variables

* iteration variables

* iteration variables

* start on bounds

* to_invariable

* bounds

* fix constraints and change input values

* start adding starting point and change dr_tk_cas etc

* add fatigue variables

* fix PROCESS to run but problems with pulse length and BB pumping power

* slight progress

* some cleanup

* still not there

* PROCESS documentation no longer has teh descriptions of ixc and icc RIP

* PROCESS documentation no longer has teh descriptions of ixc and icc RIP

* PROCESS documentation no longer has teh descriptions of ixc and icc RIP

* minor

* itvar numbers

* pause

* constraint equation mapping

* objective equation mapping

* objective equation mapping

* duplication defense

* favlue mapping

* output

* example

* fuller example

* add missing plasma models

* missed one

* add TF coil models

* more switches

* add eq var mapping file

* move template builder to api.py

* put template builder in separate file

* split out model mappings

* PROCESSModel

* self not cls

* flake8 flag for hack

* flake8 flag for hack

* docstring

* incorporate mechanics into template builder

* need to restart PC

* start piping into example

* slow an dsteady progress

* pause before rebase

* match install script

* CHEEKY NOQA

* whoops

* typos and input additions

* typos and input additions

* more missing inputs

* impurity handling

* more or less done with the PROCESS API

* inputs and tk_ts duplicaiton

* string bound weirdness

* remove spurious int

* add missing fimp

* fix missing primary pumping model

* add mode bloody switches

* Constraint enum

* objective enum

* pipe through and clean up

* update radial build example

* fix typing

* tuple

---------

Co-authored-by: james <james.cook1@ukaea.uk>
je-cook added a commit that referenced this pull request Oct 27, 2023
* 👽️ Data removal/moved

* 👽️ Non existant filepath changed

* add NLopt version correction to install-process.sh

* fix PROCESS radial build plot

* fix PROCESS plotting better

* first pass PROCESS inputs

* first pass PROCESS inputs

* formatting

* finish constraint equations

* iteration variables

* iteration variables

* iteration variables

* start on bounds

* to_invariable

* bounds

* fix constraints and change input values

* start adding starting point and change dr_tk_cas etc

* add fatigue variables

* fix PROCESS to run but problems with pulse length and BB pumping power

* slight progress

* some cleanup

* still not there

* PROCESS documentation no longer has teh descriptions of ixc and icc RIP

* PROCESS documentation no longer has teh descriptions of ixc and icc RIP

* PROCESS documentation no longer has teh descriptions of ixc and icc RIP

* minor

* itvar numbers

* pause

* constraint equation mapping

* objective equation mapping

* objective equation mapping

* duplication defense

* favlue mapping

* output

* example

* fuller example

* add missing plasma models

* missed one

* add TF coil models

* more switches

* add eq var mapping file

* move template builder to api.py

* put template builder in separate file

* split out model mappings

* PROCESSModel

* self not cls

* flake8 flag for hack

* flake8 flag for hack

* docstring

* incorporate mechanics into template builder

* need to restart PC

* start piping into example

* slow an dsteady progress

* pause before rebase

* match install script

* CHEEKY NOQA

* whoops

* typos and input additions

* typos and input additions

* more missing inputs

* impurity handling

* more or less done with the PROCESS API

* inputs and tk_ts duplicaiton

* string bound weirdness

* remove spurious int

* add missing fimp

* fix missing primary pumping model

* add mode bloody switches

* Constraint enum

* objective enum

* pipe through and clean up

* update radial build example

* fix typing

* tuple

---------

Co-authored-by: james <james.cook1@ukaea.uk>
je-cook added a commit that referenced this pull request Nov 2, 2023
* 🚧 First attempt at updating process to open source version

* 👽️ Data removal/moved

* 👽️ Non existant filepath changed

* 🎨 Add back install script

* 🎨 New url

* 🎨 Main

* 🐛 Working env and process for OS version

* 🎨 Update logflush

* ✅ Fix tests

* 🚨 Comment out thermalshields

* 🐛 Resolve conflict

* WIP: Python API to PROCESS (#2616)

* 👽️ Data removal/moved

* 👽️ Non existant filepath changed

* add NLopt version correction to install-process.sh

* fix PROCESS radial build plot

* fix PROCESS plotting better

* first pass PROCESS inputs

* first pass PROCESS inputs

* formatting

* finish constraint equations

* iteration variables

* iteration variables

* iteration variables

* start on bounds

* to_invariable

* bounds

* fix constraints and change input values

* start adding starting point and change dr_tk_cas etc

* add fatigue variables

* fix PROCESS to run but problems with pulse length and BB pumping power

* slight progress

* some cleanup

* still not there

* PROCESS documentation no longer has teh descriptions of ixc and icc RIP

* PROCESS documentation no longer has teh descriptions of ixc and icc RIP

* PROCESS documentation no longer has teh descriptions of ixc and icc RIP

* minor

* itvar numbers

* pause

* constraint equation mapping

* objective equation mapping

* objective equation mapping

* duplication defense

* favlue mapping

* output

* example

* fuller example

* add missing plasma models

* missed one

* add TF coil models

* more switches

* add eq var mapping file

* move template builder to api.py

* put template builder in separate file

* split out model mappings

* PROCESSModel

* self not cls

* flake8 flag for hack

* flake8 flag for hack

* docstring

* incorporate mechanics into template builder

* need to restart PC

* start piping into example

* slow an dsteady progress

* pause before rebase

* match install script

* CHEEKY NOQA

* whoops

* typos and input additions

* typos and input additions

* more missing inputs

* impurity handling

* more or less done with the PROCESS API

* inputs and tk_ts duplicaiton

* string bound weirdness

* remove spurious int

* add missing fimp

* fix missing primary pumping model

* add mode bloody switches

* Constraint enum

* objective enum

* pipe through and clean up

* update radial build example

* fix typing

* tuple

---------

Co-authored-by: james <james.cook1@ukaea.uk>

* PROCESS API enhancement: required input values listed for model selections (#2659)

* add model selection mechanics

* do one and move to example

* add template builder mechanics

* concision

* undo test mods

* also check variables

* populate some cases

* minor

* minor

* start on constraint equation fancy enums

* why do i have to do this

* its the weekend and i am CS fatigue

* fold in constraints

* tuples not lists

* finish constraints but a number of inconsistencies in PROCESS documentation

* adjust_variable

* warning fixes and catch typos and bugs

* more honing in on IN.DAT

* cpttf_mak removed

* model requires_values tuple

* better tuples of one

* missing inputs for constraints

* more missing inputs - not making this easy..

* remove ffuspow

* add taulimit

* taulimit

* missing tuple of one

* missing tuple of one part 2

* picky ruff

* add test for bad var name

* add test for repeated variable

* add another warning test

* check it was added too

* check bad name adjust

* test warn on overwrite

* test impurity shenanigans

* test warn on missing input model

* test warn on overwrite model

* was missing an assert

* check for missing itvars

* better check of existence for constraint itv warning

* tuples of one

* 24 is not used wtf

* 55 not used

* missing inputs

* more not used

* oacddp no longer used?!

* missing fvale mapping

* some sanity stuff but still not working

* the longest it ever  took to fail

* missed a tuple of one

* fix install script and add tests

* match up EUDEMO run

* update align some defaults

* get rid of obsolete PROCESS names

* adding endless names

* remove wrong / obsolete names

* the journey to nowhere continues

* more names

* divertor variables

* PF stuff

* physics

* physics

* TF reshuffle

* final ordering clean up

* final clean

* final clean

* couple minor tweaks

* final tweak

* explicitly apply default bounds to variables

* typo

* all bounds

* start on None

* nums to None

* lists to None

* ixc icc bounds None

* default bounds

* remove non default models

* truly default bounds

* constraint ordering

* defaults

* full defaults from ref IN.DAT

* working but feels fragile

* work on integration test

* work on integration test

* nearly there

* remove fpinj as default f-value

* test inclusion

* value tweaks in raial build and runs

* 🚑️ Fixing PROCESS InDat writer (#2690)

* 🚑️ Fixing PROCESS InDat writer

* 🐛 Need to import Parameter for dynamic typechecking

* ✅ Add test for template writing

* ✅ Test from params too

* 🎨 Add option to get params out

* ✅ Fix template builder tests

* 🐛 Fix params that were not sent

* 🎨 Use self as it is self

* 🚧 WIP None avoidance

* 🎨 Add back params

* ♻️ Cleanup

* ✅ Fix impurities test

* ✅ Fix tests

* 🐛 Skip tests if process not installed

* 📌 Upgrade env and fix test

* 🎨 Update env

* 🐛 Fix env

* 📝 Improve documentation

* 🐛 Fix runtitle

* 🏷️ Optional

* 🎨 Add runtitle

* 🏗️ Fix impurity data reading

* 📝 In eV not keV

* 📝 Docs

* 🎨 Use old env

* 🐛 ClassVar breaks stuff

* 🐛 Bad rebase

* 🚨 Fix formatting

* 🚧 TMP environment changes

* 🐛 Fix radial build

* 🐛 Sort PROCESS iteration variables

* Add PROCESS API example (#2740)

* minor

* complete example CBA to make a converging one that isnt EU-DEMO

* preamble

* add example to TOC t ree

* update impurities id

* udpate example

* improve example

* update fimp( to fimp()

* 👷 Exclude process example from examples CI

---------

Co-authored-by: james <james.cook1@ukaea.uk>

---------

Co-authored-by: je-cook <81617086+je-cook@users.noreply.github.com>
Co-authored-by: james <james.cook1@ukaea.uk>

* Update PROCESS v3 (OS) mappings for EU-DEMO (#2749)

* first pass mappings

* long_name not long name

* populate PROCESS params

* unit issue

* finish process params descriptions

* 💩 Enable really bad units

* mapping fixes

* start on special ase mechanics

* shield + vv shenanigans

* finish applying hacks

* add q_0 to test params

* add mslimit to test data

* add sigma cs

* add missing params to test data

* move q out of OUT mapping

* add proper TODOO

* ✨ Allow different in and out names for external codes (#2750)

* ✨ Allow different in and out names for external codes

* ✅ Add tests

* 🚧 A horrible hack for value=None unit=crap

* 🍻 Actually it might be ok

* manually turn shldith send back on

---------

Co-authored-by: james <james.cook1@ukaea.uk>
Co-authored-by: je-cook <81617086+je-cook@users.noreply.github.com>

* ⬆️ Use new process release

* 🚧 Get EUDEMO running (#2752)

* 🚧 WIP get eudemo working

* 🎨 Neater offset fix

* 🎨 Safe xxw

* 🙈 'stabilise' coil supports optimisation

* PROCESS inputs tweaks for EU-DEMO  (#2771)

* safety factor to 3.5

* CS fatigue inputs to SS316LN

* CS fatigue inputs to SS316LN

* working set?

* 🎨 Jc converges

---------

Co-authored-by: james <james.cook1@ukaea.uk>

* 🎨 + marker for coils with no current

* 🎨 Make xxw easier to decipher

---------

Co-authored-by: CoronelBuendia <matti.coleman@gmail.com>

---------

Co-authored-by: CoronelBuendia <matti.coleman@gmail.com>
je-cook added a commit that referenced this pull request Nov 2, 2023
* 🚧 First attempt at updating process to open source version

* 👽️ Data removal/moved

* 👽️ Non existant filepath changed

* 🎨 Add back install script

* 🎨 New url

* 🎨 Main

* 🐛 Working env and process for OS version

* 🎨 Update logflush

* ✅ Fix tests

* 🚨 Comment out thermalshields

* 🐛 Resolve conflict

* WIP: Python API to PROCESS (#2616)

* 👽️ Data removal/moved

* 👽️ Non existant filepath changed

* add NLopt version correction to install-process.sh

* fix PROCESS radial build plot

* fix PROCESS plotting better

* first pass PROCESS inputs

* first pass PROCESS inputs

* formatting

* finish constraint equations

* iteration variables

* iteration variables

* iteration variables

* start on bounds

* to_invariable

* bounds

* fix constraints and change input values

* start adding starting point and change dr_tk_cas etc

* add fatigue variables

* fix PROCESS to run but problems with pulse length and BB pumping power

* slight progress

* some cleanup

* still not there

* PROCESS documentation no longer has teh descriptions of ixc and icc RIP

* PROCESS documentation no longer has teh descriptions of ixc and icc RIP

* PROCESS documentation no longer has teh descriptions of ixc and icc RIP

* minor

* itvar numbers

* pause

* constraint equation mapping

* objective equation mapping

* objective equation mapping

* duplication defense

* favlue mapping

* output

* example

* fuller example

* add missing plasma models

* missed one

* add TF coil models

* more switches

* add eq var mapping file

* move template builder to api.py

* put template builder in separate file

* split out model mappings

* PROCESSModel

* self not cls

* flake8 flag for hack

* flake8 flag for hack

* docstring

* incorporate mechanics into template builder

* need to restart PC

* start piping into example

* slow an dsteady progress

* pause before rebase

* match install script

* CHEEKY NOQA

* whoops

* typos and input additions

* typos and input additions

* more missing inputs

* impurity handling

* more or less done with the PROCESS API

* inputs and tk_ts duplicaiton

* string bound weirdness

* remove spurious int

* add missing fimp

* fix missing primary pumping model

* add mode bloody switches

* Constraint enum

* objective enum

* pipe through and clean up

* update radial build example

* fix typing

* tuple

---------

Co-authored-by: james <james.cook1@ukaea.uk>

* PROCESS API enhancement: required input values listed for model selections (#2659)

* add model selection mechanics

* do one and move to example

* add template builder mechanics

* concision

* undo test mods

* also check variables

* populate some cases

* minor

* minor

* start on constraint equation fancy enums

* why do i have to do this

* its the weekend and i am CS fatigue

* fold in constraints

* tuples not lists

* finish constraints but a number of inconsistencies in PROCESS documentation

* adjust_variable

* warning fixes and catch typos and bugs

* more honing in on IN.DAT

* cpttf_mak removed

* model requires_values tuple

* better tuples of one

* missing inputs for constraints

* more missing inputs - not making this easy..

* remove ffuspow

* add taulimit

* taulimit

* missing tuple of one

* missing tuple of one part 2

* picky ruff

* add test for bad var name

* add test for repeated variable

* add another warning test

* check it was added too

* check bad name adjust

* test warn on overwrite

* test impurity shenanigans

* test warn on missing input model

* test warn on overwrite model

* was missing an assert

* check for missing itvars

* better check of existence for constraint itv warning

* tuples of one

* 24 is not used wtf

* 55 not used

* missing inputs

* more not used

* oacddp no longer used?!

* missing fvale mapping

* some sanity stuff but still not working

* the longest it ever  took to fail

* missed a tuple of one

* fix install script and add tests

* match up EUDEMO run

* update align some defaults

* get rid of obsolete PROCESS names

* adding endless names

* remove wrong / obsolete names

* the journey to nowhere continues

* more names

* divertor variables

* PF stuff

* physics

* physics

* TF reshuffle

* final ordering clean up

* final clean

* final clean

* couple minor tweaks

* final tweak

* explicitly apply default bounds to variables

* typo

* all bounds

* start on None

* nums to None

* lists to None

* ixc icc bounds None

* default bounds

* remove non default models

* truly default bounds

* constraint ordering

* defaults

* full defaults from ref IN.DAT

* working but feels fragile

* work on integration test

* work on integration test

* nearly there

* remove fpinj as default f-value

* test inclusion

* value tweaks in raial build and runs

* 🚑️ Fixing PROCESS InDat writer (#2690)

* 🚑️ Fixing PROCESS InDat writer

* 🐛 Need to import Parameter for dynamic typechecking

* ✅ Add test for template writing

* ✅ Test from params too

* 🎨 Add option to get params out

* ✅ Fix template builder tests

* 🐛 Fix params that were not sent

* 🎨 Use self as it is self

* 🚧 WIP None avoidance

* 🎨 Add back params

* ♻️ Cleanup

* ✅ Fix impurities test

* ✅ Fix tests

* 🐛 Skip tests if process not installed

* 📌 Upgrade env and fix test

* 🎨 Update env

* 🐛 Fix env

* 📝 Improve documentation

* 🐛 Fix runtitle

* 🏷️ Optional

* 🎨 Add runtitle

* 🏗️ Fix impurity data reading

* 📝 In eV not keV

* 📝 Docs

* 🎨 Use old env

* 🐛 ClassVar breaks stuff

* 🐛 Bad rebase

* 🚨 Fix formatting

* 🚧 TMP environment changes

* 🐛 Fix radial build

* 🐛 Sort PROCESS iteration variables

* Add PROCESS API example (#2740)

* minor

* complete example CBA to make a converging one that isnt EU-DEMO

* preamble

* add example to TOC t ree

* update impurities id

* udpate example

* improve example

* update fimp( to fimp()

* 👷 Exclude process example from examples CI

---------

Co-authored-by: james <james.cook1@ukaea.uk>

---------

Co-authored-by: je-cook <81617086+je-cook@users.noreply.github.com>
Co-authored-by: james <james.cook1@ukaea.uk>

* Update PROCESS v3 (OS) mappings for EU-DEMO (#2749)

* first pass mappings

* long_name not long name

* populate PROCESS params

* unit issue

* finish process params descriptions

* 💩 Enable really bad units

* mapping fixes

* start on special ase mechanics

* shield + vv shenanigans

* finish applying hacks

* add q_0 to test params

* add mslimit to test data

* add sigma cs

* add missing params to test data

* move q out of OUT mapping

* add proper TODOO

* ✨ Allow different in and out names for external codes (#2750)

* ✨ Allow different in and out names for external codes

* ✅ Add tests

* 🚧 A horrible hack for value=None unit=crap

* 🍻 Actually it might be ok

* manually turn shldith send back on

---------

Co-authored-by: james <james.cook1@ukaea.uk>
Co-authored-by: je-cook <81617086+je-cook@users.noreply.github.com>

* ⬆️ Use new process release

* 🚧 Get EUDEMO running (#2752)

* 🚧 WIP get eudemo working

* 🎨 Neater offset fix

* 🎨 Safe xxw

* 🙈 'stabilise' coil supports optimisation

* PROCESS inputs tweaks for EU-DEMO  (#2771)

* safety factor to 3.5

* CS fatigue inputs to SS316LN

* CS fatigue inputs to SS316LN

* working set?

* 🎨 Jc converges

---------

Co-authored-by: james <james.cook1@ukaea.uk>

* 🎨 + marker for coils with no current

* 🎨 Make xxw easier to decipher

---------

Co-authored-by: CoronelBuendia <matti.coleman@gmail.com>

---------

Co-authored-by: CoronelBuendia <matti.coleman@gmail.com>
je-cook added a commit that referenced this pull request Nov 2, 2023
* 🚧 First attempt at updating process to open source version

* 👽️ Data removal/moved

* 👽️ Non existant filepath changed

* 🎨 Add back install script

* 🎨 New url

* 🎨 Main

* 🐛 Working env and process for OS version

* 🎨 Update logflush

* ✅ Fix tests

* 🚨 Comment out thermalshields

* 🐛 Resolve conflict

* WIP: Python API to PROCESS (#2616)

* 👽️ Data removal/moved

* 👽️ Non existant filepath changed

* add NLopt version correction to install-process.sh

* fix PROCESS radial build plot

* fix PROCESS plotting better

* first pass PROCESS inputs

* first pass PROCESS inputs

* formatting

* finish constraint equations

* iteration variables

* iteration variables

* iteration variables

* start on bounds

* to_invariable

* bounds

* fix constraints and change input values

* start adding starting point and change dr_tk_cas etc

* add fatigue variables

* fix PROCESS to run but problems with pulse length and BB pumping power

* slight progress

* some cleanup

* still not there

* PROCESS documentation no longer has teh descriptions of ixc and icc RIP

* PROCESS documentation no longer has teh descriptions of ixc and icc RIP

* PROCESS documentation no longer has teh descriptions of ixc and icc RIP

* minor

* itvar numbers

* pause

* constraint equation mapping

* objective equation mapping

* objective equation mapping

* duplication defense

* favlue mapping

* output

* example

* fuller example

* add missing plasma models

* missed one

* add TF coil models

* more switches

* add eq var mapping file

* move template builder to api.py

* put template builder in separate file

* split out model mappings

* PROCESSModel

* self not cls

* flake8 flag for hack

* flake8 flag for hack

* docstring

* incorporate mechanics into template builder

* need to restart PC

* start piping into example

* slow an dsteady progress

* pause before rebase

* match install script

* CHEEKY NOQA

* whoops

* typos and input additions

* typos and input additions

* more missing inputs

* impurity handling

* more or less done with the PROCESS API

* inputs and tk_ts duplicaiton

* string bound weirdness

* remove spurious int

* add missing fimp

* fix missing primary pumping model

* add mode bloody switches

* Constraint enum

* objective enum

* pipe through and clean up

* update radial build example

* fix typing

* tuple

---------

Co-authored-by: james <james.cook1@ukaea.uk>

* PROCESS API enhancement: required input values listed for model selections (#2659)

* add model selection mechanics

* do one and move to example

* add template builder mechanics

* concision

* undo test mods

* also check variables

* populate some cases

* minor

* minor

* start on constraint equation fancy enums

* why do i have to do this

* its the weekend and i am CS fatigue

* fold in constraints

* tuples not lists

* finish constraints but a number of inconsistencies in PROCESS documentation

* adjust_variable

* warning fixes and catch typos and bugs

* more honing in on IN.DAT

* cpttf_mak removed

* model requires_values tuple

* better tuples of one

* missing inputs for constraints

* more missing inputs - not making this easy..

* remove ffuspow

* add taulimit

* taulimit

* missing tuple of one

* missing tuple of one part 2

* picky ruff

* add test for bad var name

* add test for repeated variable

* add another warning test

* check it was added too

* check bad name adjust

* test warn on overwrite

* test impurity shenanigans

* test warn on missing input model

* test warn on overwrite model

* was missing an assert

* check for missing itvars

* better check of existence for constraint itv warning

* tuples of one

* 24 is not used wtf

* 55 not used

* missing inputs

* more not used

* oacddp no longer used?!

* missing fvale mapping

* some sanity stuff but still not working

* the longest it ever  took to fail

* missed a tuple of one

* fix install script and add tests

* match up EUDEMO run

* update align some defaults

* get rid of obsolete PROCESS names

* adding endless names

* remove wrong / obsolete names

* the journey to nowhere continues

* more names

* divertor variables

* PF stuff

* physics

* physics

* TF reshuffle

* final ordering clean up

* final clean

* final clean

* couple minor tweaks

* final tweak

* explicitly apply default bounds to variables

* typo

* all bounds

* start on None

* nums to None

* lists to None

* ixc icc bounds None

* default bounds

* remove non default models

* truly default bounds

* constraint ordering

* defaults

* full defaults from ref IN.DAT

* working but feels fragile

* work on integration test

* work on integration test

* nearly there

* remove fpinj as default f-value

* test inclusion

* value tweaks in raial build and runs

* 🚑️ Fixing PROCESS InDat writer (#2690)

* 🚑️ Fixing PROCESS InDat writer

* 🐛 Need to import Parameter for dynamic typechecking

* ✅ Add test for template writing

* ✅ Test from params too

* 🎨 Add option to get params out

* ✅ Fix template builder tests

* 🐛 Fix params that were not sent

* 🎨 Use self as it is self

* 🚧 WIP None avoidance

* 🎨 Add back params

* ♻️ Cleanup

* ✅ Fix impurities test

* ✅ Fix tests

* 🐛 Skip tests if process not installed

* 📌 Upgrade env and fix test

* 🎨 Update env

* 🐛 Fix env

* 📝 Improve documentation

* 🐛 Fix runtitle

* 🏷️ Optional

* 🎨 Add runtitle

* 🏗️ Fix impurity data reading

* 📝 In eV not keV

* 📝 Docs

* 🎨 Use old env

* 🐛 ClassVar breaks stuff

* 🐛 Bad rebase

* 🚨 Fix formatting

* 🚧 TMP environment changes

* 🐛 Fix radial build

* 🐛 Sort PROCESS iteration variables

* Add PROCESS API example (#2740)

* minor

* complete example CBA to make a converging one that isnt EU-DEMO

* preamble

* add example to TOC t ree

* update impurities id

* udpate example

* improve example

* update fimp( to fimp()

* 👷 Exclude process example from examples CI

---------

Co-authored-by: james <james.cook1@ukaea.uk>

---------

Co-authored-by: je-cook <81617086+je-cook@users.noreply.github.com>
Co-authored-by: james <james.cook1@ukaea.uk>

* Update PROCESS v3 (OS) mappings for EU-DEMO (#2749)

* first pass mappings

* long_name not long name

* populate PROCESS params

* unit issue

* finish process params descriptions

* 💩 Enable really bad units

* mapping fixes

* start on special ase mechanics

* shield + vv shenanigans

* finish applying hacks

* add q_0 to test params

* add mslimit to test data

* add sigma cs

* add missing params to test data

* move q out of OUT mapping

* add proper TODOO

* ✨ Allow different in and out names for external codes (#2750)

* ✨ Allow different in and out names for external codes

* ✅ Add tests

* 🚧 A horrible hack for value=None unit=crap

* 🍻 Actually it might be ok

* manually turn shldith send back on

---------

Co-authored-by: james <james.cook1@ukaea.uk>
Co-authored-by: je-cook <81617086+je-cook@users.noreply.github.com>

* ⬆️ Use new process release

* 🚧 Get EUDEMO running (#2752)

* 🚧 WIP get eudemo working

* 🎨 Neater offset fix

* 🎨 Safe xxw

* 🙈 'stabilise' coil supports optimisation

* PROCESS inputs tweaks for EU-DEMO  (#2771)

* safety factor to 3.5

* CS fatigue inputs to SS316LN

* CS fatigue inputs to SS316LN

* working set?

* 🎨 Jc converges

---------

Co-authored-by: james <james.cook1@ukaea.uk>

* 🎨 + marker for coils with no current

* 🎨 Make xxw easier to decipher

---------

Co-authored-by: CoronelBuendia <matti.coleman@gmail.com>

---------

Co-authored-by: CoronelBuendia <matti.coleman@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
codes Tasks relating to integration of external codes usability Tasks relating to usability issues / improvements
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants