I make some simulations in AceGen and AceFEM using H1 finite elements. After computations I want to present results, in particular, deformed (or undeformed) mesh with some map (e.g. stress component) and red circle which denotes some chosen point. How can I combine SMTShowMesh with Graphics[Disc[]] located at certain point?

<< AceFEM;
SMTInputData[];
SMTAddEssentialBoundary[{"X" == 0 &, 1 -> 0, 2 -> 0, 3 -> 0}];
SMTAddEssentialBoundary[{"X" == 1 &, 1 -> 1}];
SMTMesh["Domain1", "H1", {5, 5, 5}, {{{{0, 0, 0}, {1, 0, 0}}, {{0, 1, 0}, {1, 1, 0}}}, {{{0, 0, 1}, {1, 0, 1}}, {{0, 1, 1}, {1, 1, 1}}}}];
SMTAnalysis[];
SMTNextStep[1, 1];
SMTNewtonIteration[];


For this example I want to obtain a figure with deformed mesh in planar view xy with small red disk situated at point x=0.5, y=0.5 (in the same coordinate system as deformed mesh)

SMTShowMesh["DeformedMesh" -> True, "Field" -> "Sxx", ViewPoint -> {0,0,Infinity}]
Graphics[Disk[{0.5, 0.5}, 0.1]]


I tried to use Show[] and Rasterize[], as below, but it does not work (there is no red disc)

Show[Rasterize[
SMTShowMesh["DeformedMesh" -> True,"Field"->"Sxx", ViewPoint -> {0, 0, Infinity}]],
Graphics[{Red, Disk[{0.5, 0.5}, 0.1]}]]


I will be grateful for help.

The problem is that you tried to combine expressions with different Head in Show command and that doesn't work. SMTShowMesh produces either Graphics or Graphics3D, depending on number of FEM model dimensions and Rasterize command returns Image.

(* ... evaluate this after running the original analysis in the OP's question *)
(* Image *)

(* Graphics3D *)


This is one of many possible solutions. I used Point object, because Disk doesn't exist in 3 dimensions.

Show[
SMTShowMesh["DeformedMesh" -> True, "Field" -> "Sxx", ViewPoint -> {0, 0, Infinity}],
Graphics3D[{
{Red, PointSize[0.03], Point[{0.5, 0.5, 1}]}
}]
]


You mentioned something about plotting this point in deformed coordinate system. This is how you plot the same point in initial and deformed configuration.

initialPt = {0.9, 0.9, 0.5};
displacement = SMTPostData[{"u", "v", "w"}, initialPt];
deformedPt = initialPt + displacement;

Show[
SMTShowMesh["DeformedMesh" -> False, "Mesh" -> Black, "FillElements" -> False],
SMTShowMesh["DeformedMesh" -> True, "Mesh" -> Blue, "FillElements" -> False],
Graphics3D[{
{Black, PointSize[0.02], Point[initialPt]},
{Blue, PointSize[0.02], Point[deformedPt]}
}],
ViewPoint -> {0, 0, Infinity}
]
`

• Thank you very much for your help, it works! Sep 21, 2017 at 7:54
• @Binka I'm glad to help. I suggest that you upvote the answers you like and accept the one that you like the most or the one that works for you. Please, take the quick tour to see how this site works. Sep 21, 2017 at 8:02
• thanks for useful advice, now I'm much more familiar with rules working on stackexchange website. Sep 22, 2017 at 8:08