scieee AI-readable full text Open interactive document viewer

Real-time simulation techniques for augmented learning in science and engineering

Quesada, C.; Chinesta, F.; Cueto, E.; González, D.; Huerta, A.; Alfaro, I.

Abstract

In this paper, we present the basics of a novel methodology for the development of simulation-based and augmented learning tools in the context of applied science and engineering. It is based on the extensive use of model order reduction, and particularly, of the so-called proper generalized decomposition method. This method provides a sort of meta-modeling tool without the need for prior computer experiments that allows the user to obtain real-time response in the solution of complex engineering or physical problems. This real-time capability also allows for its implementation in deployed, touch screen, handheld devices or even to be immersed into electronic textbooks. We explore here the basics of the proposed methodology and give examples on a few challenging applications never until now explored, up to our knowledge. Quesada, C.; González, D.; Alfaro, I.; Cueto, E.; Huerta, A.; Chinesta, F.

Full text

The Visual Computer manuscript No. (will be inserted by the editor) Real-time simulation techniques for augmented learning in science and engineering C. Quesada ·D. Gonz´alez ·I. Alfaro ·E. Cueto ·A. Huerta ·F. Chinesta Received: date / Accepted: date Abstract In this paper we present the basics of a novel methodology for the development of simulation-based and augmented learning tools in the context of applied science and engineering. It is based on the extensive use of model order reduction, and particularly, of the so-called Proper Generalized Decomposition (PGD) method. This method provides a sort of meta-modeling tool without the need for prior computer experiments that allows the user to obtain real-time response in the solution of complex engineering or physical problems. This real-time capability also allows for its implementation in deployed, touch-screen, handheld devices or even to be immersed into electronic textbooks. We explore here the basics of the proposed methodology and give examples on a few challenging applications never until now explored, up to our knowledge. This work has been partially supported by the IUF (Institut Universitaire de France) and by the Spanish Ministry of Economy and Competitiveness, through grants number DPI2011-27778-C02-01/02 and DPI2014-51844-C2-1/2-R. C. Quesada, D. Gonz´alez, I. Alfaro, E. Cueto Arag´on Institute of Engineering Research (I3A) Universidad de Zaragoza. Maria de Luna, 3. E-50018 Zaragoza, Spain E-mail: [email protected] A. Huerta Laboratori de Calcul Numeric (LaCaN) Dep. Matematica Aplicada III Universitat Politecnica de Catalunya, Jordi Girona 1-3,08034 Barcelona, Spain Zienkiewicz Centre for Computational Engineering, College of Engineering, Swansea University, Swansea SA2 8PP, UK F. Chinesta GEM, UMR CNRS - Centrale Nantes Institut Universtaire de France 1 rue de la Noe, BP 92101, F-44321 Nantes cedex 3, France Keywords Augmented learning ·real-time simulation ·model order reduction ·Proper Generalized Decomposition 1 Introduction Learning in a discovery environment is well-known to be different from learning in a more expository context [67]. Recently, an experiment by MIT showed that Ethiopian children were able to learn to read by themselves with the aid of tablets specially equipped [68]. Specially in higher education contexts, and particularly in engineering and applied sciences studies, it has been recently claimed that simulation-based learning enhances not only self-determined motivation, but also improves learning in general [45]. One step further, augmented learning has emerged as a new way to improve the learning process by adapting the environment to the learner. This is achieved, notably, with the use, among other devices, of touchscreens or haptic peripherals [42, 65,31,66,44,46]. Some authors claim that these results can be obtained even on a non-conscious manner [64]. While simulations allow science educators to reproduce phenomena otherwise impossible to reproduce experimentally at the classroom, handheld devices permit to benefit from their portability, interactivity and sociability, see [43] [60]. Since the appearance of interactive books, also the editorial world is suffering changes in the way we look at higher education bibliography and supporting material. When talking about higher education, however, this task becomes increasingly hard. Simulation of real engineering problems, sometimes even for, in principle, simple physical equations becomes a task of hours or is merely unaffordable. This is the case, for instance, Manuscript Click here to download Manuscript: PGD-TVC.pdf Click here to view linked References 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 2 C. Quesada et al. of the Schroedinger equation. As Nobel-prize winner R. B. Laughlin once stated about this equation, “ no computer existing, or that will ever exist, can break this barrier because it is a catastrophe of dimension” [50]. The task of implementing augmented learning strategies for complex engineering or physical problems is therefore a formidable challenge. These problems take days of supercomputing facilities to be solved. The simple possibility of solving them on deployed, handheld platforms seems to be out of reach. In addition, traditionally, simulation-based engineering sciences make use of static data. By static we mean here that inputs can not be changed dynamically during the course of the simulation. But in augmented learning environments we face a clear example of Dynamic Data Driven Application Systems (DDDAS). Nowadays, the linkage of simulation tools with external dynamic data for realtime control of simulations and applications is becoming more and more frequent. In the educational context, the external dynamic data is given by the learner’s interaction instead of measurement devices. DDDAS constitute one of the most challenging applications of simulation-based engineering sciences, due to the dynamic incorporation of additional data into an executing application, and vice versa, the ability of an application to dynamically steer the interaction process [11]. One of the most challenging applications in the field of DDDAS (also in the field of augmented learning) is that of haptic systems. By haptic we refer to those peripherals in an informatics system that provide the user with tactile sensations. Haptic devices need a feedback rate that is 20 to 40 times faster than visual ones [29], and instead of sending a predefined image may require some computations. Haptic peripherals are particularly extended in the field of virtual surgery training, for instance, surgery planning and also augmented reality. Models for living soft tissues in virtual surgery are usually highly non-linear [32], hyperelastic, possibly incorporating the presence of collagen fibre networks. Again, the challenge is formidable and constitutes what is commonly known as the third generation of surgery simulators [29]. In this paper we analyze how a simulation technique recently proposed by the authors can help in the development of augmented learning strategies for applied sciences and engineering higher education. The novel technique is called Proper Generalized Decomposition (hereafter, PGD) [24] and constitutes a generalization of Proper Orthogonal Decomposition, which is a classical approach in reduced order modeling [53,41,52,63, 9,10,20,14,54]. Unlike many other previous model order reduction techniques, PGD does not need for prior computer experiments (the so-called snapshots) that, after a statistical treatment, are used as a basis for subsequent simulations. In classical POD, these simulations need not to differ greatly from the existing samples or snapshots. Instead, PGD provides a practical means of obtaining meta-models for complex scenarios. These meta-models or computational vademecums [26] are then at real-time feedback rates. Although other model order reduction techniques have been successfully applied to real-time simulation (notably the work by Barbiˇc and James, see [13] [12]), the main difference of the approach here presented is that it allows for the reduction of parametric models. These parametric models give rise to high dimensional problems, whose solution is far from being trivial and suffers the so-called curse of dimensionality. But, on the contrary, once solved, allow the user to play with those parameters and see in real time their effect on the result of the simulation. It will be highlighted how PGD techniques can help in developing suitable strategies for solving complex, state-of-the-art engineering and physics problems at real time rates even on a smartphone or tablet and how these simulations can interact with user inputs seamlessly. 2 Proper Generalized Decomposition: a brief summary The origin of the PGD technique can be seen as arising from a variety of sources. On one hand, the work by Pierre Ladev`eze on the so-called LArge Time IN- crement (LATIN) method [47] can be seen as a first attempt to solve engineering problems in a non-incremental way. That is, problems are solved for any time at once. This technique proposed a space-time separated representation of the results. In fact, it considered time as an additional coordinate very much like the spatial ones. On the other hand, Proper Orthogonal Decomposition techniques [41,52,53] proposes the obtention of the best functions to approximate a problem after a statistical treatment of some previously obtained results, the so-called snapshots. These best functions when multiplied by time functions, give a practical and fast approximation to the solution of problems which are slightly different to the original snapshots. Proper Orthogonal Decomposition techniques are also known as Principal Component Analysis or Karhunen-Loeve transform among many different names in different disciplines. On a completely different setting, many problems in science and engineering are defined in high-dimensional spaces (a notable example is that of parametric problems, if we consider parameters as new coordinates). High-dimensional problems induce forceful difficulties in a context of mesh-based techniques such as finite 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 Real-time simulation techniques for augmented learning in science and engineering 3 differences, finite volumes or finite elements. This is due to the so-called curse of dimensionality [50], an exponential increase of the number of degrees of freedom of the problem with the number of state space dimensions. Such high-dimensional problems are very common in science and engineering. Examples of such problems are: the afore-mentioned Schroedinger equation [19], the chemical master equation [38] governing gene regulatory networks or Fokker-Planck equations in the context of the kinetic theory descriptions of complex fluids [37] [16]. In this spirit, F. Chinesta and coworkers proposed recently a technique to overcome this curse of dimensionality in the polymer modeling problem [7,8]. This technique, which is at the inception of the PGD method, assumes a separated form for the approximation of the unknown field of the problem, say u, thus generalizing the method of separation of variables: u(x1, . . . , xN)≈ Q X i=1 F1 i(x1)·. . . ·FN i(xN) (1) where xidenotes a scalar or vector coordinate defined in a domain Ωiof moderate dimension, namely Ωi⊂ Rd, with d≤3, in general. This approximation is then substituted into the set of equations characterizing the problem at hand. Usually, in an engineering or applied science context, this is a weak form of the problem, or directly the strong form of the equation, as in the gene regulatory network problem, see [6]. This simple approach overcomes the mentioned curse of dimensionality, opening the application of the PGD technique to a wide variety of problems. This technique has received a warm welcome in the scientific community, as proved by the large number of papers devoted to it in the very last years. Just to name a few, it is possible to find PGD applications to thermal problems [33,34], theories of plates and shells [17], gene regulatory networks [6], and structural mechanics [49] among many others [35,22,2,5,3,21,36]. The technique is beginning also to be understood from a mathematical point of view and its properties, convergence and error estimates have also been studied recently [51,4,48,59]. The interested reader can consult some recent surveys on the method [25,23]. But the main interest from the perspective pursued in this paper is that PGD methods opened the door to an innovative treatment of classical problems, not necessarily defined in high dimensions. When dealing with parametric problems, for instance, it has been seen that these parameters can advantageously be considered as new coordinates of the problem. Since the PGD is able to cope with an arbitrary number of dimensions without the typical exponential increase in terms of degrees of freedom, this procedure is now at hand. By considering parameters as new spatial dimensions, a new class of solutions is obtained for this type of problems. The PGD method is therefore able to obtain solutions for any value of the parameters at any point of the space, at any time instant [61,39]. So to speak, PGD provides the analyst with a sort of metamodel, but with the strong novelty of no need for previous computer experiments. Many problems in science and engineering can thus be analyzed once and for all, since the method provides the solution for any value (in a given interval) of the parameters. In Appendix A the interested reader can find the details of the PGD procedure for a solid mechanics problem in which the position of the applied load is taken as a parameter. This simple approach has been implemented in a two-stage approach. The first stage is concerned with the off-line computations in which the general form of the solution is computed, and as mentioned before once and for all. This phase may take intensive computing resources, and may need for supercomputing resources, parallel computing, GPUs, ... Note, however, that in general the computer cost at this stage is not critical since it will be done only once. Then, with the results obtained in the first off-line stage, an on-line phase can be accomplished. At this on-line stage the user, namely the learner in an educational context, can make use of the results in real-time, even on deployed, handheld devices, thanks to the simplified structure of the approximation. It is important to mention that the structure of the results file in which the multidimensional solution is stored (represented in a finite element context) is a collection of nodal values for all the separated functions composing the approximation. It is therefore very efficient. When a parameter is particularized, what we are doing in practice is a hyperplane cut of the multidimensional solution. This is done just by performing interpolation at the functions related to the parameter (dimension) that is being considered. Should the reader be interested in the development of his or her own PGD applications, it may be interested in consulting the sample Matlab code that can be downloaded from the author’s web page at http: //amb.unizar.es/PGD_Basic_web.rar. 3 Towards simulation-based and augmented learning for complex physics Based on the two-stage strategy presented before, one off-line intensive computing phase followed by a fast 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 4 C. Quesada et al. Fig. 1 Implementation on a html file with javascript. It represents the response of a cantilevered hyperelastic beam. The user applies load by touching the screen. real-time on-line simulation phase, the authors have developed and implemented a PGD platform able to run on smart-phones and tablets running Android or iOS operative systems, but also standard epub or html formats. In our implementation, the different Fj iare usually stored as one-dimensional arrays of values, thus minimizing the needed memory usage. Note that the Android 3.0 operative system, for instance, precludes the use of more than 65536 points (nodes) in the model. This is avoided by using meshes of the boundary of three-dimensional solids only, instead of a fully 3D- mesh. In Fig. 1 a screenshot is shown on the appearance of the application developed by using html and javascript. Moreover, lighter versions have been implemented on Nokia or iPhone smartphones with similar outputs, see Fig. 2. When running on a handheld device such as an smartphone or tablet, the application is able to provide the user with feedback rates enough for visual realism (on the order of 30 Hz). If haptic feedback rates are needed (i.e., on the order of 500 Hz), the application must be run on a laptop (tested on a MacBook pro running OS X Lion). Features of the open epub format also allow to implement real-time simulation apps on iPad and iPhone devices by noting that the epub format is no more than plane html text with, possibly, javascript embedded on it. This opens a plethora of possibilities to include PGD simulations on handheld devices, see Fig. 3. All these examples have been uploaded to our YouTube channel for visualization and permanent storage, see https:// www.youtube.com/channel/UCbh8NjqDDiT0KmN1sGR0ipg. Fig. 2 Implementation of thermal interactive problems on an iPhone. In this case an industrial furnace thermal simulation is running. The learner can manually adjust the working temperature on the heaters to observe the effect on the resulting temperature field. The source code for this example is included in Appendix B. Fig. 3 The iBook app in iOS devices (iPhones and iPads) also allows to easily implement real-time simulations on epub documents. 4 Examples of the performance of the proposed technique In this section several examples on how the PGD application is being used advantageously are given. In all cases we deal with complex physics, difficult to understand for undergraduate students of several disciplines. The PGD application provides them with different skills ranging from a physical interpretation of complex-valued equations, as is the case for the Helmholtz equation governing the wave agitation in a harbor, to 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 Real-time simulation techniques for augmented learning in science and engineering 5 anatomy and (possibly) soft tissue stiffness for biomedical applications in the field of endoscopic surgery. 4.1 Wave height on a harbor The knowledge of sea-wave propagation is crucial for many stages of harbor design. For instance, optimal shape is required to minimize the wave agitation in some zones of interest, usually those areas where more shipping activities are concentrated. Understanding how the incident wave can amplify inside the harbor is a major priority, for example when resonance conditions are of concern [15]. Furthermore, the wave behavior while propagating under complex harbor models is not an easy task to be interpreted by engineers, see Fig 4. The standard model which governs the wave propagation in harbors is the two-dimensional Helmholtz equation in unbounded domains. Its solution provides the wave height, or wave amplification, when dealing with a single incident wave in terms of period (or wavelength) and incident direction of propagation. But, the physical wave response on harbors extremely depends on these two model parameters. A complete wave agitation analysis requires the solution of the previous problem for any possible combination of incident wave periods and directions, determined by experimental measurements in the coastal area. Typical applications are control, optimization or inverse problems, where usually a large number of solutions are required, and, consequently, it is necessary to solve many direct problems. The solution of real harbor models demands important computational resources and usually implies extremely large computing times. Thus, usual optimization procedures are inapplicable, either because they need numerous solutions or because real-time constraints are required. To take charge of this issue, standard engineering procedure lies in solving the model with a certain set of parameters trying to cover the maximum number of combinations. Clearly, this “brute force” strategy impose a bound in the final number of cases to be analyzed and, therefore, important loss of information become evident. The presented PGD approach for this kind of problem involves, in separated form, the incident wave period and the incident direction as new coordinates in the model. With this strategy, the full 4D problem is reduced to the iterative solution of one 2D problem and two 1D problems. Hence, the solution of this model breaks the barrier that has prevented the full incident data evaluation up to nowadays. By means of readily evaluating, offline, any incident wave, engineers can obtain the wave propagation inside a harbor in a real-time Fig. 5 Example of the use of PGD for the wave propagation in the Matar´o harbor with any incident period between 5 and 14 seconds. manner, giving them a formidable support to better analyze where the wave amplifies for all the possible real situations. At the same time, the solution given by the PGD approach in the Matar´o harbor is implemented on the PGD application for Android platforms, see Fig. 5. In this case, students can dynamically change the incident period and obtain the wave amplification, in real-time, inside the area of interest, with no need of high computational resources. 4.2 The case of anatomy and endoscopic training Dissection is recognized as the best practice to learn gross anatomy. However, the price of this class of experimental training in medicine universities becomes prohibitive in most cases, due to problems arising from logistic and financial issues. Teaching anatomy with the help of multimedia and computers is nowadays an extended practice, see [40], for instance. Some recent specialities, such as endoscopic (laparoscopic) and minimally invasive surgery, for instance, need for an even more sophisticated training. In endoscopic training, surgeons have been trained for years with the help of animal models, i.e., by experimenting on pigs, for instance [30]. Apart from being very expensive, this type of training does not fit with the modern ethical treatises about experimentation on animals. Instead, simulations provide the learners with an immersive environment in which it is possible a versatile change of scenario where even extremely rare cases can be studied. The development of surgery simulators with haptic feedback is an active area of research due to the complexity of the problem. One of the sources of complexity is due to the highly non-linear behaviour of soft living 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 6 C. Quesada et al. Fig. 4 Example of simulation of the wave propagation in the Barcelona harbor. tissues, that are frequently modelled under the fiberreinforced hyperelasticity framework [1]. Other source of complexity comes from the highly restrictive feedback rates imposed by the simulators (25 Hz for visual feedback and some 500 Hz if we want to add haptic feedback to the system). The third source of complexity comes from the multi-physic nature of the phenomena occurring in the actual surgery procedure: non-linear elasticity, contact, cutting, temperature, etc. Such simulators should provide a physically more or less accurate response such that, with the use of haptic devices, a realistic feedback is transmitted to the surgeon in terms of both visual feedback and force feedback. By “accurate response” we mean that an advanced user should not encounter “unphysical” sensations when handling the simulator. We definitely do not pursue an accurate solution in engineering terms. Following [18], “... the model may be physically correct if it looks right”. Ayache and co-workers [30] defined the three generations of surgical simulators as those able to, respectively, reproduce accurately the anatomy (geometry), the physics (constitutive equations of soft tissue, temperature) and, finally, physiology (blood flow, breathing, . . . ). Undoubtedly, no third-generation simulation has ever been developed, and only some rigorous attempts have been made at the second-generation level, see [69] [28], among others. Most of the existing simulators can be classified into the first-generation category, even if they provide haptic feedback, because they only consider linear elastic response, for instance [70] [18] [27]. Other are based upon spring and mass systems, that do not even reproduce the equations of linear elasticity (see [29] and references therein). These approaches are judged clearly insufficient and clearly non realistic by most surgeons [29]. The proposed method can be used at two different levels. Firstly, if one considers a medicine student, freshman or sophomore, the PGD application introduced Fig. 6 An example of the use of the PGD approach in anatomy. In this case a human liver is being studied under palpation forces. The simulation runs online via a webpage (http://amb.unizar.es/PGD.html) stored in a university repository. before offers the possibility of an augmented learning strategy in which not only the geometry (anatomy) of the human body can efficiently be displayed, but also the learner can dynamically interact with the tissues and their relative stiffness by tapping on the screen of the handheld device (even if no haptic experience can be obtained at this level). In this way an improved experience over traditional methods [40] can be obtained. The lightness of this approach allows even to implement interactive simulations over the web, thus making possible to store these modules in university repositories, for instance. See Fig. 6 for a practical implementation of a liver palpation simulation on the web [62]. On the other hand, if connected to appropriate haptic devices, see Fig. 7, a standard computer and moni- 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 Real-time simulation techniques for augmented learning in science and engineering 7 tors, an operating theatre can efficiently be simulated. No special computational resources are necessary in this case for the on-line phase of the simulation, and even complex soft tissue models can be efficiently reproduced with haptic feedback and possibly augmented reality scenarios. In any case, the on-line phase of the simulation can incorporate complex, state-of-the-art constitutive laws without affecting the performance of the simulation [55,57,56], since the most part of the computer cost is paid at the off-line phase. The simulator is thus fed with the results of this simulations, possibly very time consuming, but made only once for life. 5 Conclusions In this paper we have introduced and studied the possibilities offered by proper generalized decomposition methods in the field of simulation-based and augmented learning. The PGD method constitutes a new paradigm in simulation-based engineering sciences, but also possesses salient features in the field of augmented reality and learning. Notably, we have explored its ability to provide for effective solutions (in terms of computing time and also storage needs) for complex physics and engineering problems that have traditionally fall out of reach for traditional simulation techniques at real time feedback rates. Several examples have been provided that show the potential of the proposed techniques to offer real-time simulation scenarios enabling augmented learning to go beyond its present limits. These examples range from problems of the theory of solid mechanics to anatomy and virtual surgery training of surgeons. Although it is envisaged that this technique could have a strong impact on the type of problem for which augmented learning strategies are developed, it is still necessary to further study how the approaches here presented could effectively improve the learning process of students at higher education institutions. Since the field of application is very broad, this type of study will probably need a detailed campaign of surveys, different for each speciality. For the time being, this approach is being employed in three different master-level courses at Ecole Centrale Nantes, France (twenty students in the computational materials course, 10 more at the modeling of composite manufacturing processes course and 12 students at the Erasmus Mundus Master program run jointly by EC Nantes, Swansea University, U.K., Stuttgart, Germany, and UPC BarcelonaTech, Spain). This constitutes part of our current effort of research and the results will be published elsewhere. A Details of the PGD procedure within a parametric problem To briefly overview the details of the PGD procedure, we consider the case of a solid in whose surface a load is assumed to act at an arbitrary point. Consider, for simplicity, the static equilibrium equations of a general solid under small strain assumptions: ∇·σ+b=0in Ω, (2) where brepresents the volumetric forces applied to the body, subjected to the following boundary conditions u=¯ uon Γu(3) σn =¯ ton Γt(4) The standard weak form of the problem is obtained after multiplying both sides of Eq. (2) by an admissible variation of the displacement, u∗, and integrating over the domain Ω. The basic ingredient of PGD is to consider the load ¯ tas a parameter of the formulation, thus enabling to obtain a parametric response surface to the problem. If the load is assumed to be applied at point sof the surface and, for the sake of simplicity in the exposition, unitary and vertical, the problem is now defined in R6, since u=u(x,s)∈Ωׯ Γ, where ¯ Γ⊆Γt represents the portion of the boundary where the load can be applied. Since the problem domain is now multi-dimensional, an alternative (doubly) weak form of problem (2)-(4) consists in finding the displacement u∈ H1(Ω)×L2(¯ Γ) such that for all u∗∈ H1 0(Ω)×L2(¯ Γ) (see [58]): Z¯ ΓZΩ (∇su∗)TσdΩd ¯ Γ=Z¯ ΓZΓt2 (u∗)TtdΓ d ¯ Γ(5) where (∇surepresents the symmetric part of the gradient of displacements, Γ=Γu∪Γtrepresents the boundary of the solid, divided into essential and natural regions, and where Γt=Γt1∪Γt2, i.e., regions of homogeneous and non-homogeneous, respectively, natural boundary conditions. In turn, we assume t=ezδ(x−s), where δrepresents the Dirac-delta function and ezrepresents the unit vector along the zdirection, in this case. This Dirac-delta term should be regularized for computation purposes and approximated by: tj≈ m X i=1 fi j(x)gi j(s) (6) by simply performing a singular value decomposition of the load, for instance. The PGD approach to the problem is characterized by the construction, in an iterative way, of an approximation to the solution in the form of a finite sum of separable functions [24]. Assume that we have converged to a solution, at iteration n, of this procedure, um j(x,s) = m X k=1 Xk j(x)·Yk j(s),(7) where the term ujrefers to the j-th component of the displacement vector, j= 1,2,3. The following term of this approximation, the (n+ 1)-th one, will be given by um+1 j(x,s) = um j(x,s) + Rj(x)·Sj(s),(8) 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 8 C. Quesada et al. Fig. 7 An second example of the use of the PGD approach in anatomy, this time with haptic response. Palpation during cholecystectomy is studied. where R(x) and S(s) are the sought functions that improve the approximation. Standard variational calculus gives the admissible variation of the displacement as u∗ j(x,s) = R∗ j(x)·Sj(s) + Rj(x)·S∗ j(s).(9) In order to determine the new pair of functions Rjand Sj, in general, a fixed-point alternating directions algorithm, in which functions Rjand Sjare sought iteratively, is chosen. A.1 Computation of S(s) assuming R(x) is known In this case, following standard assumptions of variational calculus, we have u∗ j(x,s) = Rj(x)·S∗ j(s),(10) or, equivalently, u∗(x,s) = R◦S∗, where the symbol “◦” denotes the so-called entry-wise, Hadamard or Schur multiplication for vectors. Once substituted into Eq. (5), gives Z¯ ΓZΩ ∇s(R◦S∗) : C:∇s m X k=1 Xk◦Yk+R◦S!dΩd ¯ Γ= Z¯ ΓZΓt2 (R◦S∗)· m X k=1 fk◦gk!dΓ d ¯ Γ , (11) or, equivalently (we omit obvious functional dependencies) Z¯ ΓZΩ ∇s(R◦S∗) : C:∇s(R◦S)dΩd ¯ Γ =Z¯ ΓZΓt2 (R◦S∗)· m X k=1 fk◦gk!dΓ d ¯ Γ(12) −Z¯ ΓZΩ ∇s(R◦S∗)· RndΩd ¯ Γ , where Rnrepresents: Rn=C:∇sum.(13) All the terms depending on xare known and hence we can compute all integrals over Ωand Γt2(support of the regularization of the initially punctual load) to derive an equation to compute S(s). A.2 Computation of R(x) assuming S(s) is known Equivalently, in this case, we have u∗ j(x,s) = R∗ j(x)·Sj(s),(14) which, once substituted into Eq. (5), gives Z¯ ΓZΩ ∇s(R∗◦S) : C:∇s m X k=1 Xk◦Yk+R◦S!dΩd ¯ Γ= Z¯ ΓZΓt2 (R∗◦S)· m X k=1 fk◦gk!dΓ d ¯ Γ . (15) In this case all the terms depending on s(load position) can be integrated over ¯ Γ, leading to a generalized elastic problem to compute function R(x). B Source code for an epub implementation of the real-time simulator In this appendix we include, to show the simplicity of the proposed technique, the source code of the html/javascript program to perform a simple thermal simulation. In this case, it corresponds to that in Fig. 2, a simple oven heated by two set of resistances whose temperatures can be adjusted by the user. These temperatures determine the final temperature distribution within the oven. 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 Real-time simulation techniques for augmented learning in science and engineering 9 <?xml version="1.0" encoding="utf-8" standalone="no"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>Example 2: industrial oven</title> <script src="javafiles/data2.js" type="text/javascript"> </script> <script src="javafiles/plot2.js" type="text/javascript"> </script> <script src="javafiles/plaque2.js" type="text/javascript"> </script> <script src="javafiles/ui2.js" type="text/javascript"> </script> <link charset="utf-8" href="Styles/main.css" media="screen" rel="stylesheet" type="text/css" ></link> <link charset="utf-8" href="Styles/plot.css" media="screen" rel="stylesheet" type="text/css" ></link> </head> <body> <h3>On the possibilities of real-time simulation</h3> <h1 id="heading_id_2">Simulation 2: control of an industrial oven</h1> <canvas id="canvas" width="360" height="160"></canvas> <dl> <dt>Temperature :</dt> <dd id="Temp"></dd> </dl> <div style="clear: both;"></div> <form action="#" id="inputdata" method=""> <dl> <dt><label for="xdim">X dim :</label></dt> <dd><input id="xdim" max="1" min="0" name="xdim" step="0.01" type="range" value="0.5" ></input> <span class="error" id="resx"></span></dd> <dt><label for="ydim">Y dim :</label></dt> <dd><input id="ydim" max="1" min="0" name="ydim" step="0.01" type="range" value="0.5" ></input> <span class="error" id="resy"></span></dd> <dt><label for="Temp1">Temp 1 (100-900):</label></dt> <dd><input id="Temp1" max="1" min="0" name="Temp1" step="0.01" type="range" value="0.5" ></input> <span class="error" id="resT1"></span></dd> <dt><label for="Temp2">Temp 2 (100-900):</label></dt> <dd><input id="Temp2" max="1" min="0" name="Temp2" step="0.01" type="range" value="0.5" ></input> <span class="error" id="resT2"></span></dd> </dl> </form> <div style="clear: both;"></div> 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65