Input Data

From KratosWiki
(Difference between revisions)
Jump to: navigation, search
m (Added Flag format)
Line 60: Line 60:
  
 
  Begin ModelPartData
 
  Begin ModelPartData
//  VARIABLE_NAME value
+
  //  VARIABLE_NAME value
 +
  AMBIENT_TEMPERATURE 250.00
 
  End ModelPartData
 
  End ModelPartData
 +
 
   
 
   
 
  Begin Table 1 TEMPERATURE VISCOSITY
 
  Begin Table 1 TEMPERATURE VISCOSITY
200. 2e-6
+
  200. 2e-6
300. 3e-6
+
  300. 3e-6
400. 4e-6
+
  400. 4e-6
 
  End Table
 
  End Table
 
   
 
   
 
  Begin Properties 1
 
  Begin Properties 1
DENSITY 3.4E-5  //scalar
+
  DENSITY 3.4E-5  //scalar
THICKNESS 19.5
+
  THICKNESS 19.5
ORTHOTROPIC_YOUNG_MODULUS [3] (20000,10000,8000) //vector
+
  VOLUME_ACCELERATION [3] (0.00,0.00,9.8) //vector
ORTHOTROPIC_POISSON_RATIO [3,3] ((0, 0.27,0.27),(0.087,0,0.27),(0.075,0.23,0)) // matrix
+
  LOCAL_INERTIA [3,3] ((0, 0.27,0.27),(0.087,0,0.27),(0.075,0.23,0)) // matrix
  ORTHOTROPIC_SHEAR_MODULUS [3] (4225.23,4225.23,4225.23)
+
   
 +
  Begin Table TEMPERATURE VISCOSITY
 +
  200. 2e-6
 +
  300. 3e-6
 +
  400. 4e-6
 +
  End Table
 +
 
  End Properties
 
  End Properties
 
   
 
   
 
  Begin Nodes
 
  Begin Nodes
1                  16                  0                  0
+
  1                  16                  0                  0
2                  16                0.4                  0
+
  2                  16                0.4                  0
3                15.6                  0                  0
+
  3                15.6                  0                  0
...
+
  972                  0                7.2                  0
972                  0                7.2                  0
+
  973                  0                7.6                  0
973                  0                7.6                  0
+
  974                  0                  8                  0
974                  0                  8                  0
+
 
  End Nodes
 
  End Nodes
 
   
 
   
  Begin Elements ASGS2D
+
  Begin Elements Element2D3N
1 0       649       661       641
+
  1 1        1       2       3
2 0       765       771       785
+
  2 1       2       3       972
3 0       710       700        704
+
  3 1       3       972      973
...
+
  1796 1    972      973      974
1796 0        535        563        549
+
1797 0        877        857        891
+
1798 0        612        646        628
+
 
  End Elements
 
  End Elements
+
 
+
 
  Begin Conditions Condition2D
 
  Begin Conditions Condition2D
1799 0       644        650
+
  1    1       1          2
1800 0       650        663
+
  1800 1       2          3
1801 0       663        673
+
  1801 1       3          972
...
+
  1947 1       972        973
1947 0       972        973
+
  1948 1       973        974
1948 0       973        974
+
 
  End Conditions
 
  End Conditions
 
   
 
   
 
   
 
   
 
  Begin NodalData DISPLACEMENT_X
 
  Begin NodalData DISPLACEMENT_X
1 1 0.000000
+
  1 1 0.100000
2 1 0.000000
+
  2 1 0.200000
...
+
  973 1 0.000000
973 1 0.000000
+
  974 1 0.000000
974 1 0.000000
+
 
  End NodalData
 
  End NodalData
 
   
 
   
 
  Begin NodalData DISPLACEMENT_Y
 
  Begin NodalData DISPLACEMENT_Y
1 1 0.000000
+
  1 1 0.000000
2 1 0.000000
+
  2 1 0.000000
...
+
  973 1 0.000973
973 1 0.000000
+
  974 1 0.000974
974 1 0.000000
+
 
  End NodalData
 
  End NodalData
 
   
 
   
 
  Begin NodalData DISPLACEMENT_Z
 
  Begin NodalData DISPLACEMENT_Z
1 1 0.000000
+
  1 1 0.000000
2 1 0.000000
+
  2 1 0.000000
...
+
  973 1 0.000000
973 1 0.000000
+
  974 1 0.000000
974 1 0.000000
+
 
  End NodalData
 
  End NodalData
 
   
 
   
  Begin NodalData VELOCITY_X
+
  Begin NodalData VISCOSITY
637 1 0.000000
+
  1 0 0.010000
639 1 0.000000
+
  2 0 0.010000
...
+
  973 0 0.010000
973 1 1.000000
+
  974 0 0.010000
974 1 1.000000
+
 
  End NodalData
 
  End NodalData
 
   
 
   
  Begin NodalData VELOCITY_Y
+
  Begin SubModelPart Inlets
1 1 0.000000
+
  Begin SubModelPartTables
3 1 0.000000
+
  1
...
+
  End SubModelPartTables
973 1 0.000000
+
974 1 0.000000
+
End NodalData
+
 
   
 
   
Begin NodalData VELOCITY_Z
+
  Begin SubModelPartNodes
1 1 0.000000
+
  1
3 1 0.000000
+
  2
...
+
  End SubModelPartNodes
973 1 0.000000
+
974 1 0.000000
+
End NodalData
+
 
   
 
   
Begin NodalData VISCOSITY
+
  Begin SubModelPartElements
1 0 0.010000
+
  1
2 0 0.010000
+
  End SubModelPartElements
...
+
973 0 0.010000
+
974 0 0.010000
+
End NodalData
+
 
   
 
   
Begin NodalData DENSITY
+
  Begin SubModelPartConditions
1 0 1.000000
+
  1
2 0 1.000000
+
  1800
...
+
  End SubModelPartConditions
  973 0 1.000000
+
   
974 0 1.000000
+
  Begin SubModelPart Inlet1
End NodalData
+
  Begin SubModelPartNodes
 +
    1
 +
    3
 +
  End SubModelPartNodes
  
If the varibale we want to set is a flag, just have to skip the fixicity column and set the values to 0(False) or 1 (True)
+
  Begin SubModelPartConditions
 
+
    1
Begin NodalData INLET // Now we are setting a flag
+
    1800
  1 0 // Pay attention that now we just have 2 columns. Id and True/False. There is no fixicity
+
  End SubModelPartConditions
2 1
+
   
  End NodalData
+
  End SubModelPart
 
+
   
Begin Mesh 2
+
  Begin SubModelPart Inlet2
 +
  Begin SubModelPartConditions
 +
    1800
 +
    1801
 +
  End SubModelPartConditions
 +
  End SubModelPart
 
   
 
   
    Begin MeshNodes
+
End SubModelPart
    1
+
    3
+
    End MeshNodes
+
 
   
 
   
    Begin MeshElements
+
Begin SubModelPart Outlet
    1
+
  Begin SubModelPartProperties
    2
+
    1
    End MeshElements
+
  End SubModelPartProperties
 
   
 
   
    Begin MeshConditions
+
  Begin SubModelPartConditions
    1
+
  1948
    End MeshConditions
+
  End SubModelPartConditions
 
   
 
   
  End Mesh
+
  End SubModelPart
  
 
The old format for data file is still supported due to the backward compatibility but without further improvement. The old format description can be found [[Old Input Data | here]]
 
The old format for data file is still supported due to the backward compatibility but without further improvement. The old format description can be found [[Old Input Data | here]]

Revision as of 11:10, 26 February 2016

The current input data consist of one archive with .mdpa extension. The input file is free format and the reading is not depend to the spaces, tabs, endlines etc.

This format contains all ModelPart's data in a minimalistic block form and consists of 8 blocks of data in following form:

 Begin ModelPartData
 //  VARIABLE_NAME value
 End ModelPartData

 Begin Table table_id variable1 variable2 
 // table_x table_y
 End Table
 
 Begin Properties  properties_id 
 //  VARIABLE_NAME value
 End Properties
 
 Begin Nodes
 // id	  X	Y	Z
 End Nodes
 
 Begin Elements element_name
 // id prop_id	 n1	n2	n3	...
 End Elements
 
 Begin Conditions condition_name 
 // id prop_id	 n1	n2	n3	...
 End Conditions
 
 Begin NodalData VARIABLE_NAME
 //  id is_fixed value
 End NodalData
 
 Begin ElementalData VARIABLE_NAME
 //  id value
 End ElementalData
 
 Begin ConditionalData VARIABLE_NAME
 //  id value
 End ConditionalData 
 
 Begin Mesh mesh_id   // mesh_id cannot be zero!
 
     Begin MeshNodes
     // node_id
     End MeshNodes
 
     Begin MeshElements
     // element_id
     End MeshElements
 
     Begin MeshConditions
     // condition_id
     End MeshConditions
 
 End Mesh

Each block starts with a Begin statement following by the block name and ends with the End statement again following by the block name. Some block may have some additional parameter like id or variable in their definitions.

An example is presented in the following lines:

Begin ModelPartData
 //  VARIABLE_NAME value
 AMBIENT_TEMPERATURE 250.00
End ModelPartData


Begin Table 1 TEMPERATURE VISCOSITY
 200. 2e-6
 300. 3e-6
 400. 4e-6
End Table

Begin Properties 1
 DENSITY 3.4E-5  //scalar
 THICKNESS 19.5
 VOLUME_ACCELERATION [3] (0.00,0.00,9.8) //vector
 LOCAL_INERTIA [3,3] ((0, 0.27,0.27),(0.087,0,0.27),(0.075,0.23,0)) // matrix

 Begin Table TEMPERATURE VISCOSITY
  200. 2e-6
  300. 3e-6
  400. 4e-6
 End Table

End Properties

Begin Nodes
 1                  16                   0                   0
 2                  16                 0.4                   0
 3                15.6                   0                   0
 972                   0                 7.2                   0
 973                   0                 7.6                   0
 974                   0                   8                   0
End Nodes

Begin Elements Element2D3N
 1 1        1        2        3
 2 1        2        3        972
 3 1        3        972      973
 1796 1     972      973      974
End Elements
 
Begin Conditions Condition2D
 1    1        1          2
 1800 1        2          3
 1801 1        3          972
 1947 1        972        973
 1948 1        973        974
End Conditions


Begin NodalData DISPLACEMENT_X
 1 1 0.100000
 2 1 0.200000
 973 1 0.000000
 974 1 0.000000
End NodalData

Begin NodalData DISPLACEMENT_Y
 1 1 0.000000
 2 1 0.000000
 973 1 0.000973
 974 1 0.000974
End NodalData

Begin NodalData DISPLACEMENT_Z
 1 1 0.000000
 2 1 0.000000
 973 1 0.000000
 974 1 0.000000
End NodalData

Begin NodalData VISCOSITY
 1 0 0.010000
 2 0 0.010000
 973 0 0.010000
 974 0 0.010000
End NodalData

Begin SubModelPart Inlets
 Begin SubModelPartTables
  1
 End SubModelPartTables

 Begin SubModelPartNodes
  1
  2
 End SubModelPartNodes

 Begin SubModelPartElements
  1
 End SubModelPartElements

 Begin SubModelPartConditions
  1
  1800
 End SubModelPartConditions

 Begin SubModelPart Inlet1
  Begin SubModelPartNodes
   1
   3
  End SubModelPartNodes
  Begin SubModelPartConditions
   1
   1800
  End SubModelPartConditions

 End SubModelPart

 Begin SubModelPart Inlet2
  Begin SubModelPartConditions
   1800
   1801
  End SubModelPartConditions
 End SubModelPart

End SubModelPart

Begin SubModelPart Outlet
  Begin SubModelPartProperties
   1
  End SubModelPartProperties

 Begin SubModelPartConditions
  1948
 End SubModelPartConditions

End SubModelPart

The old format for data file is still supported due to the backward compatibility but without further improvement. The old format description can be found here

Personal tools
Categories