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

Issue18 a flo attributes #19

Merged
merged 3 commits into from
Mar 29, 2021
Merged

Issue18 a flo attributes #19

merged 3 commits into from
Mar 29, 2021

Conversation

kbenne
Copy link
Collaborator

@kbenne kbenne commented Mar 19, 2021

No description provided.

@kbenne kbenne requested a review from mwetter March 19, 2021 20:18
@kbenne kbenne self-assigned this Mar 19, 2021
Copy link
Contributor

@mwetter mwetter left a comment

Choose a reason for hiding this comment

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

This change needs to be applied to all parameters, not only to AFlo.
In addition, it also needs to be applied to the surface object.
See https://lbl-srg.github.io/soep/softwareArchitecture.html for the list of parameters.

@kbenne
Copy link
Collaborator Author

kbenne commented Mar 22, 2021

I have been thinking about restructuring the code related to I/O variables, probably with a class hierarchy of some kind. The current design is a bit brutalist. However, such ambition is not in the cards right now, so I'm just correcting issues based on the current implantation.

Since this is becoming more of a comprehensive review of the FMU metadata I'm just going to consolidate on this one branch and corresponding PR. In that spirit, #17, is contained in this PR so I'm going to close #17. Future commits of FMU metadata will be included in this PR also, until it is right.

@mwetter
Copy link
Contributor

mwetter commented Mar 23, 2021

The code around

var.real_attributes.emplace_back("start","0.0");

seems to be inconsistent with

        var.type = VariableType::TSURF;
        var.name = surface.idfname;
        var.epunittype = spawn::units::UnitType::C;
        var.mounittype = spawn::units::UnitType::K;

        var.scalar_attributes.emplace_back("name",surface.idfname + "_T");
        var.scalar_attributes.emplace_back("valueReference", std::to_string(i));
        var.scalar_attributes.emplace_back("description","Temperature of the surface");
        var.scalar_attributes.emplace_back("causality","input");
        var.scalar_attributes.emplace_back("variability","continuous");

        var.real_attributes.emplace_back("quantity","ThermodynamicTemperature");
        var.real_attributes.emplace_back("relativeQuantity","false");
        var.real_attributes.emplace_back("start","0.0");
        var.real_attributes.emplace_back("unit",spawn::units::toString(var.mounittype));
        var.setValue(21.0, spawn::units::UnitSystem::EP);

        result.emplace(i,std::move(var));

which sets the value to 21.

Otherwise it looks good.

@kbenne kbenne merged commit 1087bc2 into develop Mar 29, 2021
@kbenne kbenne deleted the issue18-AFlo-attributes branch March 29, 2021 15:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants