Inp export incompatibility. Ccx Format

I’m having some troubles with the Prepomax inp export tool.

According to the ccx manual continuation lines for elements having more than 15 nodes (maximum 16 entries per line) are end up with a coma on the first line before the line change.

Example:

*ELEMENT,ELSET=Eall,TYPE=C3D20R
1,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15, <----------
16,17,18,19,20

Prepomax exports without coma which gives me some compatibility problems when reading the elements on exported files.

Example:

*Element,Type=C3D20,Elset=Solid_part-45

29241,120966,121014,121016,121015,141963,141966,141969,141967,121191,121190,121193,121192,142582,142584,142585
142583,142578,142579,142580,142581
29242,141963,141966,141969,141967,141915,141964,141968,141965,142582,142584,142585,142583,142590,142592,142593
142591,142586,142587,142588,142589
1 Like

Maybe we want to check the file:
“CaeModel/FileInOut/Output/Calculix/Keywords/ModelDefinition/CalElement.cs”
And add a change of format to the 16th item and then keep the same code as before? - Can you test if this works @ANYS ?

This is actually strange. I also think there should be a comma at the end of the line if the line continues. I have fixed the CalElement.cs file and added the line sb.Append(","); to the method GetDataString inside the if condition as folows:

if (count == 17)        // 16 entries per line; 17th entry goes in new line
{
    sb.Append(",");
    sb.AppendLine();
    sb.Append(nodeId);
}
1 Like

I have manually added the coma to the inp at some of the lines and then it works. That’s the problem for sure.

By other hand the coma is present for the rest of the Element Sets, Node sets, Surface sets,which are recognized and properly read.

1 Like

Beautiful! Thank you @Matej.