Skip to content
Snippets Groups Projects
geometry.js 35.9 KiB
Newer Older
	},
	solve: solveFea,
	bar:false
	
};

var oldVoxel={
	nodes: [
	{
	  id: 'n0', 
	  parent: '11',
	  degrees_of_freedom:[0,1,2] , //todo automate
	  restrained_degrees_of_freedom:[true,true,true],
	  position: { x: 0, y: 0,z:0 },
	  force:{ x: 0, y: 0,z:0 },
	  displacement: { x: 0, y: 0,z:0 }
	},
	{
		id: 'n1', 
		parent: '11',
		degrees_of_freedom:[3,4,5]  ,
		restrained_degrees_of_freedom:[false,false,false],
		position: { x: -5, y: 7.5,z:-5  },
		force:{ x: 0, y: -200,z:0 },
		displacement: { x: 0, y: 0,z:0 }
	},
	{
		id: 'n2',
		parent: '11',
		degrees_of_freedom:[6,7,8]  ,
		restrained_degrees_of_freedom:[false,false,false],
		position: { x: -5, y: 7.5,z:5  },
		force:{ x: 0, y: -200,z:0 },
		displacement: { x: 0, y: 0,z:0 }
	},
	{
		id: 'n3',
		parent: '11',
		degrees_of_freedom:[9,10,11]  ,
		restrained_degrees_of_freedom:[false,false,false],
		position: { x: 5, y: 7.5,z:5  },
		force:{ x: 0, y:-200,z:0 },
		displacement: { x: 0, y: 0,z:0 }
	},
	{
		id: 'n4',
		parent: '11',
		degrees_of_freedom:[12,13,14]  ,
		restrained_degrees_of_freedom:[false,false,false],
		position: { x: 5, y: 7.5,z: -5  },
		force:{ x: 0, y: -200,z:0 },
		displacement: { x: 0, y: 0,z:0 }
	},
	{
		id: 'n5',
		parent: '11',
		degrees_of_freedom:[15,16,17]  ,
		restrained_degrees_of_freedom:[false,false,false],
		position: { x: 0, y: 15,z: 0  },
		force:{ x: 0, y: -400,z:0 },
		displacement: { x: 0, y: 0,z:0 }
	}
  	],
	edges: [
		{ id: 'e0', source: 0, target: 1 ,area:1.0,density:0.284,stiffness:30.0e6,stress:0 },
		{ id: 'e1', source: 0, target: 2 ,area:1.0,density:0.284,stiffness:30.0e6,stress:0 },
		{ id: 'e2', source: 0, target: 3 ,area:1.0,density:0.284,stiffness:30.0e6,stress:0 },
		{ id: 'e3', source: 0, target: 4 ,area:1.0,density:0.284,stiffness:30.0e6,stress:0 },

		{ id: 'e4', source: 1, target: 2 ,area:1.0,density:0.284,stiffness:30.0e6,stress:0 },
		{ id: 'e5', source: 2, target: 3 ,area:1.0,density:0.284,stiffness:30.0e6,stress:0 },
		{ id: 'e6', source: 3, target: 4 ,area:1.0,density:0.284,stiffness:30.0e6,stress:0 },
		{ id: 'e7', source: 4, target: 1 ,area:1.0,density:0.284,stiffness:30.0e6,stress:0 },

		{ id: 'e8', source: 5, target: 1 ,area:1.0,density:0.284,stiffness:30.0e6,stress:0 },
		{ id: 'e9', source: 5, target: 2 ,area:1.0,density:0.284,stiffness:30.0e6,stress:0 },
		{ id: 'e10', source: 5, target: 3 ,area:1.0,density:0.284,stiffness:30.0e6,stress:0 },
		{ id: 'e11', source: 5, target: 4 ,area:1.0,density:0.284,stiffness:30.0e6,stress:0 },

	],
	//material properties - AISI 1095 Carbon Steel (Spring Steel)
	ndofs   : 6*3,

	animation :  {
	
		showDisplacement : true,
		exaggeration : 10000,
		speed:3.0
		
	},
	viz :  {
	
		
		minStress:-500,
		maxStress: 500,
		colorMaps:[YlGnBu, winter, coolwarm,jet],
		colorMap:0,
		
	},
	solve: solveFea,
	bar:true
	
};

var setupEmpty={//empty
	nodes: [
		],
	edges: [
		],

	//material properties - AISI 1095 Carbon Steel (Spring Steel)
	ndofs   : 3*6,

	animation :  {
	
		showDisplacement : true,
		exaggeration : 20e2,
		speed:3.0
		
	},
	viz :  {
		minStress:10e6,
		maxStress: -10e6,
		colorMaps:[coolwarm,YlGnBu, winter ,jet],
		colorMap:0,
		
	},
	
};