How to Add a New Condition

From KratosWiki
(Difference between revisions)
Jump to: navigation, search
m (Adding a link to the relevant info, since it was empty before)
 
(One intermediate revision by one user not shown)
Line 1: Line 1:
On several occasions we wonder how add to our model a series of conditions such as distributed loads, Point Loads, among other things.
+
See [[How to Add a New Element (Condition)]].
 
+
In this section, we'll focus more on structural aplications. For exemple, in this case we are going
+
to put a conditios of Puntual Load. In  our python file we need to add  from the model part the variables or
+
conditios that we are going to use: in this case we add FORCE or DISPLACEMENT in the main python file:
+
 
+
 
+
  #adding Nodal Variables
+
  model_part.AddNodalSolutionStepVariable(FORCE);
+
  model_part.AddNodalSolutionStepVariable(DISPLACEMENT);
+
 
+
 
+
After this, we need to add the variables to the solver
+
 
+
  #adding of Variables to Model Part should be here
+
  structural_solver_static.AddVariables(model_part)
+
 
+
 
+
Before in the file ( .cond and .init ) the conditions were written as follow:
+
 
+
  # init file
+
  NODES[391](FORCE_Y,0)        = 0.000000; 
+
  NODES[391](FORCE_X,0)        = 0.000000; 
+
  NODES[391](FORCE_Z,0)        = 0.000000; 
+
+
  #cond file
+
  CONDITIONS[1] = PointForce2D([391],1);
+
 
+
 
+
And now in the .mpda file we can see:
+
 
+
  Begin NodalData DISPLACEMENT_X
+
  38 1 0.000000
+
  358 1 0.000000
+
  440 1 0.000000
+
  End NodalData
+
 
+
  Begin NodalData DISPLACEMENT_Y
+
  38 1 0.000000
+
  End NodalData
+
 
+
  Begin NodalData FORCE_X
+
  440 0 0.000000
+
  End NodalData
+
 
+
  Begin NodalData FORCE_Y
+
  440 0 0.000000
+
  End NodalData
+
 
+
Begin NodalData FORCE_Z
+
440 0 0.000000
+
End NodalData
+
 
+
 
+
[[Category:How To]]
+

Latest revision as of 17:57, 11 December 2016

See How to Add a New Element (Condition).

Personal tools
Categories