I have a question regarding what seems to be a problem with the xml format I export from MATLAB using Gibbon. To give a little context, I am exporting a FE model from FEBio, modifying it in MATLAB, and exporting it back out. I am trying to assign a specific Young’s Modulus to each element in my mesh, and this seemed to be the best way. The problem is, the formatting of the xml code is slightly different:
Exported from FEBio (read using notepad, originally an .feb file):
The xml (.feb) file is read in using xml2struct: https://www.mathworks.com/matlabcent...518-xml2struct, modified, and exported from MATLAB using febioStruct2xml. Then, reading the modified version of the xml file, it looks like this:
This form is not recognized my FEBio, and I get error messages such as:
Screenshot 2020-10-13 180429.png
If I replace the first few lines with the original xml code, I still get errors such as:
Screenshot 2020-10-13 180241.png
as it seems that FEBio doesn't recognize the <Attributes> lines (I have also removed the <Text> fields but errors persist).
Having fixed each of that type of error manually, FEBio gives the message "skipping lines 5,6,9,47 etc", and opens a blank project.
I’m not sure if I’m doing something wrong, or if this path of doing things is not reasonable, but I’d really appreciate any help with this! Sorry for the long post.
Exported from FEBio (read using notepad, originally an .feb file):
Code:
<?xml version="1.0" encoding="ISO-8859-1"?> <febio_spec version="3.0"> <Module type="solid"/> <Control> <analysis>STATIC</analysis> <time_steps>10</time_steps> <step_size>0.1</step_size> <solver> <max_refs>15</max_refs> <max_ups>10</max_ups> <diverge_reform>1</diverge_reform> <reform_each_time_step>1</reform_each_time_step> <dtol>0.001</dtol> <etol>0.01</etol> <rtol>0</rtol> <lstol>0.9</lstol> <min_residual>1e-20</min_residual> <qnmethod>BFGS</qnmethod> <rhoi>0</rhoi> </solver>
Code:
<?xml version="1.0" encoding="UTF-8"?> <febio_spec> <!--Created using GIBBON, 10-Oct-2020 20:03:21--> <febio_spec> <Module> <Text/> <Attributes> <type>solid</type> </Attributes> </Module> <Control> <analysis> <Text>STATIC</Text> </analysis> <time_steps> <Text>10</Text> </time_steps> <step_size> <Text>0.1</Text> </step_size> <solver> <max_refs> <Text>15</Text> </max_refs> <max_ups> <Text>10</Text> </max_ups> <diverge_reform> <Text>1</Text> </diverge_reform> <reform_each_time_step> <Text>1</Text> </reform_each_time_step> <dtol> <Text>0.001</Text> </dtol> <etol> <Text>0.01</Text> </etol> <rtol> <Text>0</Text> </rtol> <lstol> <Text>0.9</Text> </lstol> <min_residual> <Text>1e-20</Text> </min_residual> <qnmethod> <Text>BFGS</Text> </qnmethod> <rhoi> <Text>0</Text> </rhoi> </solver>
Screenshot 2020-10-13 180429.png
If I replace the first few lines with the original xml code, I still get errors such as:
Screenshot 2020-10-13 180241.png
as it seems that FEBio doesn't recognize the <Attributes> lines (I have also removed the <Text> fields but errors persist).
Having fixed each of that type of error manually, FEBio gives the message "skipping lines 5,6,9,47 etc", and opens a blank project.
I’m not sure if I’m doing something wrong, or if this path of doing things is not reasonable, but I’d really appreciate any help with this! Sorry for the long post.
Comment