Browse Source

fix bug in material_property_

master
Chen Wei 2 years ago
parent
commit
d2c2cde3dc
  1. 4
      sim-test/rigid-test/cube/config.json
  2. 4
      sim-test/rigid-test/cube/config.json.in
  3. 2057
      sim-test/rigid-test/cube/deformed-surf.obj
  4. 3
      src/static_sim/StaticSim.cpp

4
sim-test/rigid-test/cube/config.json

@ -1,5 +1,5 @@
{ {
"material": [1e5, 0.3, 1e3], "material": [2e11, 0.3, 1e3],
"mshFilePath": "/home/cw/opt/StaticSimulation/sim-test/rigid-test/cube/cube_9743.msh", "mshFilePath": "/home/cw/opt/StaticSimulation/sim-test/rigid-test/cube/cube_9743.msh",
"DBC": [ "DBC": [
@ -13,7 +13,7 @@
{ {
"min": [-0.001, 0.999, -0.001], "min": [-0.001, 0.999, -0.001],
"max": [1.001, 1.001, 1.001], "max": [1.001, 1.001, 1.001],
"force": [-10, 0, 0] "force": [0, -1, 0]
} }
] ]
} }

4
sim-test/rigid-test/cube/config.json.in

@ -1,5 +1,5 @@
{ {
"material": [1e5, 0.3, 1e3], "material": [2e11, 0.3, 1e3],
"mshFilePath": "@LOCAL_DIR@/cube_9743.msh", "mshFilePath": "@LOCAL_DIR@/cube_9743.msh",
"DBC": [ "DBC": [
@ -13,7 +13,7 @@
{ {
"min": [-0.001, 0.999, -0.001], "min": [-0.001, 0.999, -0.001],
"max": [1.001, 1.001, 1.001], "max": [1.001, 1.001, 1.001],
"force": [-10, 0, 0] "force": [0, -1, 0]
} }
] ]
} }

2057
sim-test/rigid-test/cube/deformed-surf.obj

File diff suppressed because it is too large

3
src/static_sim/StaticSim.cpp

@ -31,6 +31,9 @@ namespace ssim {
DirichletBCs = config.DirichletBCs; DirichletBCs = config.DirichletBCs;
NeumannBCs = config.NeumannBCs; NeumannBCs = config.NeumannBCs;
material_property_.Youngs_Modulus = config.YM;
material_property_.Poisson_ratio = config.PR;
material_property_.density = config.density;
Utils::elasticMatrix(config.YM, config.PR, D); Utils::elasticMatrix(config.YM, config.PR, D);
if (!Utils::readTetMesh(config.mshFilePath, TV, TT, SF)) { if (!Utils::readTetMesh(config.mshFilePath, TV, TT, SF)) {
spdlog::error("Unable to read input msh file: {:s}", config.mshFilePath); spdlog::error("Unable to read input msh file: {:s}", config.mshFilePath);

Loading…
Cancel
Save