Skip to content

Commit 5bc7077

Browse files
set inertia type as proc
1 parent 0978b16 commit 5bc7077

2 files changed

Lines changed: 50 additions & 40 deletions

File tree

kratos.gid/apps/DEM/xml/Processes.xml

Lines changed: 40 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,14 @@
22
<ProcessList>
33
<!-- <parameter n="ANGULAR_VELOCITY_Z" pn="ω z" type="double" v="0.0" function="0" parent="LinearPeriodic" unit_magnitude="Angle/T" units="rad/s"/> -->
44

5-
<Process n="DEM-FEM-Wall-Process" pn="Impose vector value by direction process" python_module="assign_vector_by_direction_to_condition_process" kratos_module="KratosMultiphysics" help="This process fixes all the components of a given vector variable" check="DirectorVectorNonZero direction">
6-
<inputs>
7-
<parameter n="SetActive" type="bool" pn="Activate" v="true" help="Set Yes to activate the group">
8-
<parameter n="DEM-ImposedMotion" parent="true" pn="Type of motion" type="combo" v="None" values="None,LinearPeriodic,FreeMotion" pvalues="None,Imposed linear/angular motion,Free body motion" help="Choose if the solid should should be fixed, have an imposed motion or a free motion" show_in_window="0">
9-
<parameter n="Mass" parent="FreeMotion" pn="Mass" type="double" v="1.0" units="Kg" unit_magnitude="M" show_in_window="0"/>
10-
<parameter n="CenterOfMass" parent="FreeMotion" pn="Center of mass" type="inline_vector" v="0.0,0.0,0.0" units="m" unit_magnitude="L" show_in_window="0"/>
11-
<parameter n="Inertia" parent="FreeMotion" pn="Inertia(Kg*m2)" type="inline_vector" v="1.0,1.0,1.0" units="Kg*m^2" unit_magnitude="Inertia" show_in_window="0" help="2D: Define value inertia value in the first component"/>
12-
5+
<Process n="DEM-FEM-Wall-Process" pn="Impose vector value by direction process" python_module="assign_vector_by_direction_to_condition_process" kratos_module="KratosMultiphysics" help="This process fixes all the components of a given vector variable" check="DirectorVectorNonZero direction">
6+
<inputs>
7+
<parameter n="SetActive" type="bool" pn="Activate" v="true" help="Set Yes to activate the group">
8+
<parameter n="DEM-ImposedMotion" parent="true" pn="Type of motion" type="combo" v="None" values="None,LinearPeriodic,FreeMotion" pvalues="None,Imposed linear/angular motion,Free body motion" help="Choose if the solid should should be fixed, have an imposed motion or a free motion" show_in_window="0">
9+
<parameter n="Mass" parent="FreeMotion" pn="Mass" type="double" v="1.0" units="kg" unit_magnitude="M" show_in_window="0"/>
10+
<parameter n="CenterOfMass" parent="FreeMotion" pn="Center of mass" type="inline_vector" v="0.0,0.0,0.0" units="m" unit_magnitude="L" show_in_window="0"/>
11+
<parameter n="Inertia" parent="FreeMotion" pn="Inertia(kg*m2)" type="[DEM::xml::InertiaType]" v="1.0" show_in_window="0" help="" />
12+
1313
<parameter n="DEM-DOFS" parent="FreeMotion" type="combo" v="No" pn="Degrees of Freedom" values="No,Yes" pvalues="No,Yes" show_in_window="0">
1414
<parameter n="Ax" parent="FreeMotion,Yes" type="combo" v="No" pn="Fix Velocity X" values="No,Constant,FromATable" pvalues="No,Constant,From a table" help="Fix Velocity X" show_in_window="0">
1515
<parameter n="Vx" parent="Constant" v="0.0" pn=" Value" unit_magnitude="Velocity" units="m/s" help="X Velocity" show_in_window="0"/>
@@ -199,23 +199,23 @@
199199
<Process n="DEM-Inlet-Process" pn="" python_module="" kratos_module="KratosMultiphysics">
200200
<inputs>
201201
<parameter n="SetActive" type="bool" pn="Activate" v="true">
202-
<parameter n="InletMotionType" pn="Motion type" parent="true" type="combo" v="None" values="None,LinearPeriodic,FromATable" pvalues="None,Linear/Periodic,From a table" show_in_window="0">
203-
<parameter n="VelocityModulus" parent="LinearPeriodic" pn="Velocity modulus" type="double" v="1.0" units="m/s" unit_magnitude="Velocity" show_in_window="0"/>
204-
<parameter n="DirectionVector" parent="LinearPeriodic" pn="Direction vector" type="inline_vector" v="1.0,0.0,0.0" show_in_window="0"/>
205-
<parameter n="LinearPeriodic" parent="LinearPeriodic" pn="Periodic" type="bool" v="false" help="active: the imposed velocity values are the maximum of an harmonic oscillation with the given period" show_in_window="0">
206-
<parameter n="LinearPeriod" parent="true" pn="Period" type="double" v="5.0" units="s" unit_magnitude="T" show_in_window="0"/>
202+
<parameter n="InletMotionType" pn="Motion type" parent="true" type="combo" v="None" values="None,LinearPeriodic,FromATable" pvalues="None,Linear/Periodic,From a table" show_in_window="0">
203+
<parameter n="VelocityModulus" parent="LinearPeriodic" pn="Velocity modulus" type="double" v="1.0" units="m/s" unit_magnitude="Velocity" show_in_window="0"/>
204+
<parameter n="DirectionVector" parent="LinearPeriodic" pn="Direction vector" type="inline_vector" v="1.0,0.0,0.0" show_in_window="0"/>
205+
<parameter n="LinearPeriodic" parent="LinearPeriodic" pn="Periodic" type="bool" v="false" help="active: the imposed velocity values are the maximum of an harmonic oscillation with the given period" show_in_window="0">
206+
<parameter n="LinearPeriod" parent="true" pn="Period" type="double" v="5.0" units="s" unit_magnitude="T" show_in_window="0"/>
207207
</parameter>
208-
<parameter n="LinearStartTime" parent="LinearPeriodic" pn="Linear Start time" type="double" v="0.0" units="s" unit_magnitude="T" show_in_window="0"/>
209-
<parameter n="LinearEndTime" parent="LinearPeriodic" pn="Linear end time" type="double" v="100.0" units="s" unit_magnitude="T" show_in_window="0"/>
210-
211-
<parameter n="AngularVelocityModulus" parent="LinearPeriodic" pn="Angular velocity modulus" type="double" v="0.0" units="rad/s" unit_magnitude="Angle/T" show_in_window="0"/>
212-
<parameter n="AngularDirectionVector" parent="LinearPeriodic" pn="Direction vector" type="inline_vector" v="1.0,0.0,0.0" show_in_window="0"/>
213-
<parameter n="CenterOfRotation" parent="LinearPeriodic" pn="Center of rotation(m)" type="inline_vector" v="0.0,0.0,0.0" help="Components of the position of the rotation center. Linear velocity is imposed to this center" show_in_window="0"/>
214-
<parameter n="AngularPeriodic" parent="LinearPeriodic" pn="Periodic" type="bool" v="false" help="active: the imposed velocity values are the maximum of an harmonic oscillation with the given period" show_in_window="0">
215-
<parameter n="AngularPeriod" parent="true" pn="Period" type="double" v="5.0" units="s" unit_magnitude="T" show_in_window="0"/>
208+
<parameter n="LinearStartTime" parent="LinearPeriodic" pn="Linear Start time" type="double" v="0.0" units="s" unit_magnitude="T" show_in_window="0"/>
209+
<parameter n="LinearEndTime" parent="LinearPeriodic" pn="Linear end time" type="double" v="100.0" units="s" unit_magnitude="T" show_in_window="0"/>
210+
211+
<parameter n="AngularVelocityModulus" parent="LinearPeriodic" pn="Angular velocity modulus" type="double" v="0.0" units="rad/s" unit_magnitude="Angle/T" show_in_window="0"/>
212+
<parameter n="AngularDirectionVector" parent="LinearPeriodic" pn="Direction vector" type="inline_vector" v="1.0,0.0,0.0" show_in_window="0"/>
213+
<parameter n="CenterOfRotation" parent="LinearPeriodic" pn="Center of rotation(m)" type="inline_vector" v="0.0,0.0,0.0" help="Components of the position of the rotation center. Linear velocity is imposed to this center" show_in_window="0"/>
214+
<parameter n="AngularPeriodic" parent="LinearPeriodic" pn="Periodic" type="bool" v="false" help="active: the imposed velocity values are the maximum of an harmonic oscillation with the given period" show_in_window="0">
215+
<parameter n="AngularPeriod" parent="true" pn="Period" type="double" v="5.0" units="s" unit_magnitude="T" show_in_window="0"/>
216216
</parameter>
217-
<parameter n="AngularStartTime" parent="LinearPeriodic" pn="Angular start time" type="double" v="0.0" units="s" unit_magnitude="T" show_in_window="0"/>
218-
<parameter n="AngularEndTime" parent="LinearPeriodic" pn="Angular end time" type="double" v="1000" units="s" unit_magnitude="T" show_in_window="0"/>
217+
<parameter n="AngularStartTime" parent="LinearPeriodic" pn="Angular start time" type="double" v="0.0" units="s" unit_magnitude="T" show_in_window="0"/>
218+
<parameter n="AngularEndTime" parent="LinearPeriodic" pn="Angular end time" type="double" v="1000" units="s" unit_magnitude="T" show_in_window="0"/>
219219

220220
<!-- Ready to activate fixed dofs on inlet when required. -->
221221
<!-- <parameter n="Ax" parent="FixedDOFs" type="combo" v="No" pn="Fix Velocity X" values="No,Constant" pvalues="No,Constant" help="Fix Velocity X">
@@ -243,27 +243,27 @@
243243
<parameter n="TypeOfFlowMeasurement" parent="true" pn="Flow measurement" type="combo" v="Particles" values="Particles,Kilograms" pvalues="Particles per second,Kilograms per second" show_in_window="0">
244244
<parameter n="NumberOfParticles" parent="Particles" pn="Particles per second" type="double" v="200.0" show_in_window="0"/>
245245
<parameter n="InletLimitedVelocity" parent="Kilograms" pn="Inlet injection speed limit (m/s)" type="double" v="2.0" help="Inlet injection speed limit (m/s)" show_in_window="0"/>
246-
<parameter n="InletMassFlow" parent="Kilograms" pn="Mass flow (Kg/s)" type="double" v="0.5" unit_magnitude="M/T" units="kg/s" show_in_window="0"/>
246+
<parameter n="InletMassFlow" parent="Kilograms" pn="Mass flow (kg/s)" type="double" v="0.5" unit_magnitude="M/T" units="kg/s" show_in_window="0"/>
247247
</parameter>
248248

249-
<parameter n="InletElementType" pn="Element Type" parent="true" type="combo" v="SphericParticle3D" values="SphericParticle3D,Cluster3D,SingleSphereCluster" pvalues="Sphere,Cluster,SingleSphereCluster" help="Choose if you want this Inlet to insert spheres or clusters" show_in_window="0">
250-
<parameter n="Excentricity" parent="SingleSphereCluster" type="double" v="0.1" pn="Excentricity (%)" help="% of the radius" show_in_window="0"/>
251-
<parameter n="ProbabilityDistributionOfExcentricity" parent="SingleSphereCluster" type="combo" v="normal" pn="Probability Distribution of excentricity" values="normal,lognormal" help="Choose the probablility distribution of the diameter" show_in_window="0"/>
252-
<parameter n="StandardDeviationOfExcentricity" parent="SingleSphereCluster" type="double" v="0.1" pn="Standard Deviation of excentricity" help="Standard Deviation of the Diameter, assuming Normal Distribution. If 0.0 is chosen, a uniform diameter distribution will be created" show_in_window="0"/>
253-
<parameter n="ClusterType" pn="Cluster Type" parent="Cluster3D" type="combo" v="Rock1Cluster3D" values="Rock1Cluster3D,Rock2Cluster3D,Ballast1Cluster3D,Ballast1Cluster3Dred,Ballast2Cluster3D,Ballast2Cluster3Dred,Ballast3Cluster3D,Ballast3Cluster3Dred,Ballast4Cluster3D,Ballast4Cluster3Dred,Ballast5Cluster3D,Ballast2Cluster5Dred,Ballast6Cluster3D,Ballast6Cluster3Dred,LineCluster3D,RingCluster3D,SoyBeanCluster3D,SoyBean3Cluster3D,CornKernelCluster3D,CornKernel3Cluster3D,Wheat5Cluster3D,CapsuleCluster3D" help="Choose the shape of the particle or cluster of particles" show_in_window="0"/>
254-
<parameter n="RandomOrientation" pn="Random Orientation" parent="Cluster3D" type="combo" v="Yes" values="Yes,No" help="Random Orientation" show_in_window="0">
255-
<parameter n="OrientationX" pn="Orientation X" parent="No" v="0.0" type="combo" help="First parameter of the imaginary part of the orientation quaternion" show_in_window="0"/>
256-
<parameter n="OrientationY" pn="Orientation Y" parent="No" v="0.0" type="double" help="Second parameter of the imaginary part of the orientation quaternion" show_in_window="0"/>
257-
<parameter n="OrientationZ" pn="Orientation Z" parent="No" v="0.0" type="double" help="Third parameter of the imaginary part of the orientation quaternion" show_in_window="0"/>
258-
<parameter n="OrientationW" pn="Orientation W" parent="No" v="1.0" type="double" help="Real part of the orientation quaternion" show_in_window="0"/>
249+
<parameter n="InletElementType" pn="Element Type" parent="true" type="combo" v="SphericParticle3D" values="SphericParticle3D,Cluster3D,SingleSphereCluster" pvalues="Sphere,Cluster,SingleSphereCluster" help="Choose if you want this Inlet to insert spheres or clusters" show_in_window="0">
250+
<parameter n="Excentricity" parent="SingleSphereCluster" type="double" v="0.1" pn="Excentricity (%)" help="% of the radius" show_in_window="0"/>
251+
<parameter n="ProbabilityDistributionOfExcentricity" parent="SingleSphereCluster" type="combo" v="normal" pn="Probability Distribution of excentricity" values="normal,lognormal" help="Choose the probablility distribution of the diameter" show_in_window="0"/>
252+
<parameter n="StandardDeviationOfExcentricity" parent="SingleSphereCluster" type="double" v="0.1" pn="Standard Deviation of excentricity" help="Standard Deviation of the Diameter, assuming Normal Distribution. If 0.0 is chosen, a uniform diameter distribution will be created" show_in_window="0"/>
253+
<parameter n="ClusterType" pn="Cluster Type" parent="Cluster3D" type="combo" v="Rock1Cluster3D" values="Rock1Cluster3D,Rock2Cluster3D,Ballast1Cluster3D,Ballast1Cluster3Dred,Ballast2Cluster3D,Ballast2Cluster3Dred,Ballast3Cluster3D,Ballast3Cluster3Dred,Ballast4Cluster3D,Ballast4Cluster3Dred,Ballast5Cluster3D,Ballast2Cluster5Dred,Ballast6Cluster3D,Ballast6Cluster3Dred,LineCluster3D,RingCluster3D,SoyBeanCluster3D,SoyBean3Cluster3D,CornKernelCluster3D,CornKernel3Cluster3D,Wheat5Cluster3D,CapsuleCluster3D" help="Choose the shape of the particle or cluster of particles" show_in_window="0"/>
254+
<parameter n="RandomOrientation" pn="Random Orientation" parent="Cluster3D" type="combo" v="Yes" values="Yes,No" help="Random Orientation" show_in_window="0">
255+
<parameter n="OrientationX" pn="Orientation X" parent="No" v="0.0" type="combo" help="First parameter of the imaginary part of the orientation quaternion" show_in_window="0"/>
256+
<parameter n="OrientationY" pn="Orientation Y" parent="No" v="0.0" type="double" help="Second parameter of the imaginary part of the orientation quaternion" show_in_window="0"/>
257+
<parameter n="OrientationZ" pn="Orientation Z" parent="No" v="0.0" type="double" help="Third parameter of the imaginary part of the orientation quaternion" show_in_window="0"/>
258+
<parameter n="OrientationW" pn="Orientation W" parent="No" v="1.0" type="double" help="Real part of the orientation quaternion" show_in_window="0"/>
259259
</parameter>
260260
</parameter>
261261

262-
<parameter n="InletStartTime" parent="true" pn="Inlet start" type="double" v="0.0" units="s" unit_magnitude="T" help="Inlet start time" show_in_window="0"/>
263-
<parameter n="InletStopTime" parent="true" pn="Inlet stop" type="double" v="100.0" units="s" unit_magnitude="T" help="Inlet stop time" show_in_window="0"/>
264-
<parameter n="ParticleDiameter" parent="true" pn="Diameter" type="double" v="1.0" units="m" unit_magnitude="L" show_in_window="0"/>
265-
<parameter n="ProbabilityDistribution" parent="true" pn="Probability distribution" type="combo" v="normal" values="normal,lognormal" show_in_window="0"/>
266-
<parameter n="StandardDeviation" parent="true" pn="Standard deviation" type="double" v="0.0" units="m" unit_magnitude="L" show_in_window="0"/>
262+
<parameter n="InletStartTime" parent="true" pn="Inlet start" type="double" v="0.0" units="s" unit_magnitude="T" help="Inlet start time" show_in_window="0"/>
263+
<parameter n="InletStopTime" parent="true" pn="Inlet stop" type="double" v="100.0" units="s" unit_magnitude="T" help="Inlet stop time" show_in_window="0"/>
264+
<parameter n="ParticleDiameter" parent="true" pn="Diameter" type="double" v="1.0" units="m" unit_magnitude="L" show_in_window="0"/>
265+
<parameter n="ProbabilityDistribution" parent="true" pn="Probability distribution" type="combo" v="normal" values="normal,lognormal" show_in_window="0"/>
266+
<parameter n="StandardDeviation" parent="true" pn="Standard deviation" type="double" v="0.0" units="m" unit_magnitude="L" show_in_window="0"/>
267267

268268
<!-- TO BE FIXED JG!insert material BUT not constitutive law in the tree -->
269269
<parameter n="ConstitutiveLaw" special_command="DEM::xml::InsertConstitutiveLawForParameters" args="" pn="" state="hidden"/>
@@ -323,7 +323,7 @@
323323
<parameter n="TypeOfFlowMeasurement" parent="true" pn="Flow measurement" type="combo" v="Particles" values="Particles,Kilograms" pvalues="Particles per second,Kilograms per second" show_in_window="0">
324324
<parameter n="NumberOfParticles" parent="Particles" pn="Particles per second" type="double" v="200.0" show_in_window="0"/>
325325
<parameter n="InletLimitedVelocity" parent="Kilograms" pn="Inlet injection speed limit (m/s)" type="double" v="2.0" help="Inlet injection speed limit (m/s)" show_in_window="0"/>
326-
<parameter n="InletMassFlow" parent="Kilograms" pn="Mass flow (Kg/s)" type="double" v="0.5" unit_magnitude="M/T" units="kg/s" show_in_window="0"/>
326+
<parameter n="InletMassFlow" parent="Kilograms" pn="Mass flow (kg/s)" type="double" v="0.5" unit_magnitude="M/T" units="kg/s" show_in_window="0"/>
327327
</parameter>
328328
<parameter n="InletElementType" pn="Element Type" parent="true" type="combo" v="CylinderPartDEMElement2D" values="CylinderPartDEMElement2D" pvalues="Circle" show_in_window="0"/>
329329
<parameter n="InletStartTime" parent="true" pn="Inlet start" type="double" v="0.0" units="s" unit_magnitude="T" help="Inlet start time" show_in_window="0"/>

kratos.gid/apps/DEM/xml/XmlController.tcl

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,5 +96,15 @@ proc DEM::xml::ProcGetDEMPartsOvWhat { domNode args } {
9696
}
9797

9898

99+
proc DEM::xml::InertiaType { args } {
100+
set ret inline_vector
101+
if {$::Model::SpatialDimension eq "2D"} {
102+
set ret double
103+
}
104+
105+
return $ret
106+
}
107+
108+
99109

100110
DEM::xml::Init

0 commit comments

Comments
 (0)