Skip to content
This repository has been archived by the owner on Apr 23, 2021. It is now read-only.

Data correctness is not enforced (example: openfoam setup in simphony-ui) #420

Open
stefanoborini opened this issue Jun 28, 2017 · 0 comments

Comments

@stefanoborini
Copy link
Contributor

In simphony-ui, the following situation is present:

    pressure_BC = {}                                                                      
    pressure_BC['inlet'] = get_boundary_condition_description(                            
            inlet_BC.pressure_boundary_condition)                                         
    pressure_BC['outlet'] = get_boundary_condition_description(                           
            outlet_BC.pressure_boundary_condition)                                        
    pressure_BC['walls'] = get_boundary_condition_description(                            
            walls_BC.pressure_boundary_condition)                                         
    pressure_BC['frontAndBack'] = get_boundary_condition_description(                     
            front_and_back_BC.pressure_boundary_condition)                                
    openfoam_wrapper.BC[CUBA.PRESSURE] = pressure_BC     

Two things are incorrect here, but I will focus only on the one on the topic. The point is that CUBA.PRESSURE (defined in cuba.yml to refer to a double) it is instead referring to a complex dict structure that has nothing to do with a pressure value.

The fact is that this works because openfoam wrapper just accepts this, as there are pretty much no enforcement strategies for correctness, the openfoam wrapper can do pretty much what it wants, and so is the client enforcing it, but it's a violation of simphony data model fundamental rules that makes it confusing to use and inconsistent.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant