Work with H3D files

Agonzalez
Agonzalez New Altair Community Member
edited October 2020 in Community Q&A

Hello,

I am triying to work with H3D files, but I don't undertand somethings. I have some matrices that I want to put into a H3D file to use later in Fenfat. I have used this comands and the black parts are that ones I don't know how to used:

 

1) fid01 = createh3dfile('C:/Users/Base_A/000_Compose/Result_06.h3d');
2) createh3ddatatype(fid01, 'DT scalar elem:nolayer nocorner', 'scalar', 'elem', 0, 0);
3) createh3dsubcase(fid01, 'Subcase_61M', {'SC1 Iteration 1'})
4) writeh3ddata(fid01, 'Subcase_61M', 1, 'char', 0, 0, Elem_ID, y61M2);
5) closeh3dfile(fid01);

 

Elemn_ID and y61M2 are two matricess column with the same dimensions --> [100000x1]

 

% fid_ID = createh3dfile(filename)
% createh3ddatatype(fid_ID, label, format, bind[, hasLayers, hasCorners])

% writeh3ddata(fid_ID, subcase, simulation, datatype, layer, corners, entities, data)
% closeh3dfile(fid_ID)

 

Any one know how to used this comnads?? The explain in the web doesn't help me.

 

Thank you guys!!!

Alex

Tagged:

Answers

  • robertavarela
    robertavarela New Altair Community Member
    edited October 2019

    Alex, hello!

     

    Please find attached an example with the script and a few files for you to try out.

     

    First of all, please keep in mind that the model information is not inside this new .h3d file, therefore you need to open a model file and the created results file in HyperView if you need to visualize it.

     

    There are 2 opening modes that might be used: new and append:
    - new clears the .h3d file for writing
    - append adds new information but it cannot modify existing information, which means means that it is not possible to add datatypes, layers or values to an existing subcase

    The hierarchy that must be followed is this one:
    - Layer definition (if needed)
    - Datatype definition (needs the layer in case there is one)
    - Subcase definition (needs the datatype)
    - Data per se (needs the subcase, datatype and layer in case there is one)
     

    Regards,

     

    Roberta

    Unable to find an attachment - read this blog