Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug in SquareTissue if deformation is not plan #17

Open
epernod opened this issue Nov 5, 2022 · 0 comments
Open

Bug in SquareTissue if deformation is not plan #17

epernod opened this issue Nov 5, 2022 · 0 comments
Labels
bug (major) Something isn't working

Comments

@epernod
Copy link
Contributor

epernod commented Nov 5, 2022

Simply change the gravity as gravity="0 -10 -3" and the scene is really unstable

<?xml version="1.0" ?>
<!--Test case 1: Upper border is fixed and only heavy gravity is applied -->

<Node name="root" dt="0.01" showBoundingTree="0" gravity="0 -10 -3">
	<Node name="RequiredPlugins">
		<RequiredPlugin name="Sofa.Component.Collision.Detection.Algorithm"/> <!-- Needed to use components [BVHNarrowPhase, BruteForceBroadPhase, DefaultPipeline] -->
		<RequiredPlugin name="Sofa.Component.Collision.Detection.Intersection"/> <!-- Needed to use components [MinProximityIntersection] -->
		<RequiredPlugin name="Sofa.Component.Collision.Geometry"/> <!-- Needed to use components [TriangleCollisionModel] -->
		<RequiredPlugin name="Sofa.Component.Collision.Response.Contact"/> <!-- Needed to use components [DefaultContactManager] -->
		<RequiredPlugin name="Sofa.Component.Constraint.Projective"/> <!-- Needed to use components [FixedConstraint] -->
		<RequiredPlugin name="Sofa.Component.Engine.Select"/> <!-- Needed to use components [BoxROI] -->
		<RequiredPlugin name="Sofa.Component.IO.Mesh"/> <!-- Needed to use components [MeshGmshLoader] -->
		<RequiredPlugin name="Sofa.Component.LinearSolver.Iterative"/> <!-- Needed to use components [CGLinearSolver] -->
		<RequiredPlugin name="Sofa.Component.Mapping.Linear"/> <!-- Needed to use components [IdentityMapping] -->
		<RequiredPlugin name="Sofa.Component.Mass"/> <!-- Needed to use components [DiagonalMass] -->
		<RequiredPlugin name="Sofa.Component.ODESolver.Backward"/> <!-- Needed to use components [EulerImplicitSolver] -->
		<RequiredPlugin name="Sofa.Component.SceneUtility"/> <!-- Needed to use components [InfoComponent] -->
		<RequiredPlugin name="Sofa.Component.SolidMechanics.FEM.Elastic"/> <!-- Needed to use components [TriangularFEMForceField] -->
		<RequiredPlugin name="Sofa.Component.SolidMechanics.Spring"/> <!-- Needed to use components [TriangularBendingSprings] -->
		<RequiredPlugin name="Sofa.Component.StateContainer"/> <!-- Needed to use components [MechanicalObject] -->
		<RequiredPlugin name="Sofa.Component.Topology.Container.Dynamic"/> <!-- Needed to use components [TriangleSetGeometryAlgorithms, TriangleSetTopologyContainer, TriangleSetTopologyModifier] -->
		<RequiredPlugin name="Sofa.Component.Visual"/> <!-- Needed to use components [VisualStyle] -->
		<RequiredPlugin name="Sofa.GL.Component.Rendering3D"/> <!-- Needed to use components [OglModel] -->
		<RequiredPlugin name="tearing"/>
	</Node>
	
    <VisualStyle displayFlags="showVisual showBehaviorModels" />

    <DefaultAnimationLoop />
    <DefaultPipeline verbose="0" />
    <BruteForceBroadPhase/>
    <BVHNarrowPhase/>
    <DefaultContactManager response="PenalityContactForceField" />
    <MinProximityIntersection name="Proximity" alarmDistance="0.8" contactDistance="0.5" />
    
    <Node name="SquareGravity_FEM">
        <EulerImplicitSolver name="cg_odesolver" printLog="false"  rayleighStiffness="0.1" rayleighMass="0.1" />
        <CGLinearSolver iterations="25" name="linear solver" tolerance="1.0e-9" threshold="1.0e-9" />
        <MeshGmshLoader name="meshLoader" filename="mesh/square3.msh" scale="10" createSubelements="true" />
        
        <TriangleSetTopologyContainer  name="Container" src="@meshLoader" fileTopology="" tags=" " />
        <TriangleSetTopologyModifier   name="Modifier" />
        <TriangleSetGeometryAlgorithms name="GeomAlgo"   template="Vec3d" />
        
        <MechanicalObject name="Mo"/>
        <DiagonalMass massDensity="10.0" />
        
        <BoxROI name="FixedSide" box="-0.1 9.9 0.1  10.1 10.1 -0.1" drawBoxes="1" />
        <FixedConstraint name="FixedConstraint" indices="@FixedSide.indices" />

        <TriangularFEMForceField name="FEM" youngModulus="300" poissonRatio="0.3" method="large" computePrincipalStress="1"/>
        <TriangularBendingSprings name="FEM-Bend" stiffness="400" />
        <PlaneForceField normal="0 1 0" d="-20" stiffness="100000" showPlane="1" showPlaneSize="20"/>
        
        <TriangleCollisionModel />
        
        <TearingEngine name="TearingEngine" input_position="@Mo.position" stressThreshold="10.0" 
            step="30" nbFractureMax="40" showFracturePath="1"/>
			
        <Node >
            <OglModel name="Visual" color="red" />
            <IdentityMapping input="@.." output="@Visual" />
        </Node>
    </Node>
    
</Node>

@epernod epernod added the bug (major) Something isn't working label Nov 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug (major) Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant