Menu

Failing to validate inclusion of fission tables

2019-01-15
2019-01-15
  • Leonard Nielsen

    Leonard Nielsen - 2019-01-15

    Dear Professor Meyer,

    I've been following your guide to adding fission to an r-process calculation: https://sourceforge.net/u/mbradle/blog/2018/11/adding-fission-to-an-r-process-calculation/

    Everything works up to the point of validating. I get a fission.xml of the form

    <reaction_data>
      <reaction>
        <source>custom fission table</source>
        <reactant>n</reactant>
        <reactant>os199</reactant>
        <product>sr98</product>
        <product>sr98</product>
        <product>n</product>
        <product>n</product>
        <product>n</product>
        <product>n</product>
        <single_rate>9.26364033857e+19</single_rate>
      </reaction>
      <reaction>
        <source>custom fission table</source>
        <reactant>n</reactant>
        <reactant>os199</reactant>
        <product>sr99</product>
        <product>sr99</product>
        <product>n</product>
        <product>n</product>
        <single_rate>1.80741554126e+20</single_rate>
      </reaction>
    
      ...
    
        <reaction>
        <source>custom fission table</source>
        <reactant>mt302</reactant>
        <product>ba152</product>
        <product>i143</product>
        <product>n</product>
        <product>n</product>
        <product>n</product>
        <product>n</product>
        <product>n</product>
        <product>n</product>
        <product>n</product>
        <single_rate>9.47771929478e+40</single_rate>
      </reaction>
      <reaction>
        <source>custom fission table</source>
        <reactant>mt302</reactant>
        <product>ba152</product>
        <product>i144</product>
        <product>n</product>
        <product>n</product>
        <product>n</product>
        <product>n</product>
        <product>n</product>
        <product>n</product>
        <single_rate>9.6144445581e+40</single_rate>
      </reaction>
    </reaction_data>
    

    Printing reactions seems to work fine. I copied the "net_with_fission.xml" on your blog post. But when I try to validate I get

    >../libnucnet/print_valid_reactions net_with_fission.xml
    fission.xml:0: element product: Schemas validity error : Element 'product': This element is not expected. Expected is one of ( rate_table, single_rate, non_smoker_fit, user_rate ).
    
    ...
    
    fission.xml:0: element product: Schemas validity error : Element 'product': This element is not expected. Expected is one of ( rate_table, single_rate, non_smoker_fit, user_rate ).
    Not a valid Libnucnet__Net input xml file!
    >
    

    Same thing happens when I try to validate using

    xmllint --noout --xinclude --schema http://libnucnet.sourceforge.net/xsd_pub/2017-01-04/libnucnet__net.xsd net_with_fission.xml
    

    The fission table is very large (some 8000 individual reactions) and computed using a bunch of first-order estimates, and some end up with ridiculously large rates (doesn't really matter for my purposes), plus, some end up with very many products. It looks like the validation process runs into more products than it expects, but I can't find any instances of there being too many products (which doesn't mean there aren't) and there's no indication of where in the file the issues are. Using print_reactions works fine.

    What is the likely cause of this error message?

    EDIT : I tried just including the first two reactions or so, and that validates. So it looks like there are invalid reactions included, but I don't know what the cause of the invalidity is. But, when I try to only include the last reaction, I get the error message. Is there a cap on how many products I can include? Looks like it's capped at a maximum of 6 products. I guess I could put some constraints on how many neutrons can be emitted, but it would be interesting to know where the constraint is in libnucnet exactly...

    EDIT 2: Aha! Found the constraint in http://libnucnet.sourceforge.net/xsd_pub/2014-12-13/libnucnet__reac__types.xsd

    It must be:

    <xsd:element name="product" type="rdt:product_type" minOccurs="1" maxOccurs="6"/>

    Will it cause any issues if I try to run with the network with more than 6 products?

    Thanks!

    /L.C.

     

    Last edit: Leonard Nielsen 2019-01-15
    • Bradley S. Meyer

      Hi Leonard,

      Thanks for this post. I had changed the allowed number of reactants and products to not be bounded, but I was still importing the old namespace. Could you try validating with a new version:

      xmllint --noout --xinclude --schema http://libnucnet.sourceforge.net/xsd_pub/2019-01-15/libnucnet__net.xsd net_with_fission.xml

      That should work. The libnucnet routines won't work until I release a new version of libnucnet, which will occur in a day or two. Let me know how it goes. Best wishes.

       
      • Leonard Nielsen

        Leonard Nielsen - 2019-01-15

        It works! Thanks a lot!

         
        • Bradley S. Meyer

          Glad to hear it. I'll get the new schema location in the next version of libnucnet soon so all example codes will work correctly. Best wishes.

           

Anonymous
Anonymous

Add attachments
Cancel





Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.