3 research outputs found

    Object-oriented design patterns in Fortran 90/95: mazev1, mazev2 and mazev3

    No full text
    This paper discusses the concept, application, and usefulness of software design patterns for scientific programming in Fortran 90/95. An example from the discipline of object-oriented design patterns, that of a game based on navigation through a maze, is used to describe how some important patterns can be implemented in Fortran 90/95 and how the progressive introduction of design patterns can usefully restructure Fortran software as it evolves. This example is complemented by a discussion of how design patterns have been used in a real-life simulation of Particle-in-Cell plasma physics. The following patterns are mentioned in this paper: Factory, Strategy, Template, Abstract Factory and Facade. Program summary: Program title: mazev1, mazev2, mazev3. Catalogue identifier: AEAI_v1_0. Program summary URL: http://cpc.cs.qub.ac.uk/summaries/AEAI_v1_0.html. Program obtainable from: CPC Program Library, Queen's University, Belfast, N. Ireland. Licensing provisions: Standard CPC licence, http://cpc.cs.qub.ac.uk/licence/licence.html. No. of lines in distributed program, including test data, etc.: 1958. No. of bytes in distributed program, including test data, etc.: 17 100. Distribution format: tar.gz. Programming language: Fortran 95. Computer: PC/Mac. Operating system: Unix/Linux/Mac (FreeBSD)/Windows (Cygwin). RAM: These are interactive programs with small (KB) memory requirements. Classification: 6.5, 20. Nature of problem: A sequence of programs which demonstrate the use of object oriented design patterns for the restructuring of Fortran 90/95 software. The programs implement a simple maze game similar to that described in [1]. Solution method: Restructuring uses versions of the Template, Strategy and Factory design patterns. Running time: Interactive. References: [1] E. Gamma, R. Helm, R. Johnson, J. Vlissides, Design Patterns: Elements of Reusable Object Oriented Software, Addison-Wesley, 1995, ISBN 0201633612

    Large eddy simulation of self-gravitating accretion disks

    Get PDF
    Seit Mitte des letzten Jahrhunderts hat sich der Gedanke etabliert, dass der gravitative Kollaps von Molekülwolken durch Erhaltung des in ihnen vorhanden Drehimpulses zur Bildung einer scheibenartigen Struktur und damit u.a. zum Geburtsort unseres Sonnensystems führt. Dieser Entstehungsprozess ist einer ganzen Reihe von Objekten gemein und kann auf den unterschiedlichsten Größenskalen erfolgen. Das eigentliche Problem ist die Umverteilung des Drehimpulses, ohne die es keine Entwicklung zu beispielsweise einem Hauptreihenstern geben kann. Das Aufsammeln von Material durch das Zentralobjekt wird als Akkretion bezeichnet. Der Mechanismus der Akkretion spielt in der Astrophysik eine entscheidende Rolle, da die Akkretionsscheibe ebenfalls den "Motor" der aktiven galaktischen Kerne bildet. Durch innere Reibung wird Gravitationsenergie sehr effizient dissipiert, so dass sie zu den leuchtkräftigsten Objekten im Universum gehören. Sie spielen damit eine entscheidende Rolle in der Entstehung von Galaxien und haben somit auch einen Einfluss auf die kosmologische Entwicklung. Der Fakt, dass wir diese Objekte beobachten können, bedeutet, dass sie sich mindestens auf Zeitskalen kleiner als das Weltalter entwickelt haben müssen, was eine durch molekulare Prozesse vermittelte innere Reibung (Viskosität) ausschließt. Die Effekte wären um viele Größenordnungen zu gering, weshalb seit langem Konsens darüber besteht, dass eine durch Turbulenz hervorgerufene Viskosität erforderlich ist. In dieser Arbeit wird sich dieser Problematik dahingehend genähert, dass die seit einigen Jahrzehnten etablierten sehr einfachen Parametrisierungen einer turbulenten Viskosität durch eine allgemeinere Theorie, die auf die jeweils vorherrschende Strömungsgegebenheit Rücksicht nimmt, zu ersetzen. Hierbei wird die Methode der Large Eddy Simulation (LES) verwendet, die große Verbreitung in der Meteorologie und den Ingenieurwissenschaften gefunden hat und ebenfalls zunehmend bei astrophysikalischen Fragestellungen eingesetzt wird. Obwohl die darin enthaltenen Methoden ebenfalls heuristischer Natur sind, haben sie den Vorteil, dass sie einerseits durch Vergleich mit Experimenten ihre Daseinsberechtigung untermauern können und zweitens an die tatsächlich in der Simulation auftretende Turbulenz rückkoppeln. Für die Untersuchung werden Akkretionsscheiben mit und ohne dominantes Scheibenpotential jeweils im klassischen Ansatz und mit der LES durchgeführt. Die ansonsten identischen Modelle werden eingehend analysiert. Es zeigt sich dabei, dass die auftretenden Akkretionsraten teilweise starke Ähnlichkeiten aufweisen und ebenfalls zu einem annähernd gleichen Massenwachstum des Zentralobjektes führen. Um den Nachteil von zweidimensionalen Modellen wett zu machen, werden ebenfalls rotationssymmetrische und flache Modelle untereinander verglichen. Auch hier zeigt sich tendenziell ein ähnliches Verhalten, was als Rechtfertigung für den Ansatz verstanden werden kann. Bei den flachen Modellen treten verstärkt nicht achsensymmetrische Instabilitäten auf, die das gesamte Verhalten der Scheibe stark beeinflussen.Since the middle of last century, the idea has been established that the gravitational collapse of molecular clouds results in a disk-like structure due to conservation of angular momentum. This process occurs on very different length scales and is applicable to a variety of astrophysical objects from the formation of our solar system to the evolution of black holes in galaxy centers. The fundamental problem is the redistribution of angular momentum which is a necessary condition for the evolution of the central object. The collecting of material through the central object is called accretion. It is believed that accretion discs are the engines of active galactic nuclei (AGN), which play a major role for galaxy formation and therefore have an impact on cosmological evolution. Due to viscosity gravitational energy is dissipated very effectively so that they are among the most luminous objects in the universe. The fact that we can observe these objects means that they must have evolved at least on time scales less than the age of the universe. Therefore molecular viscosity as source for energy dissipation is ruled out because the expected time scales are orders of magnitudes too large. This is the reason why there is a broad consensus that turbulence is the only way to explain the short time scales. This thesis approaches the problem by replacing the rather simple but well established methods with a more general theory of turbulence modeling. This type of simulation is called large eddy simulation (LES) and has been used in meteorology and engineering sciences for decades. Although these methods are also based on heuristic assumptions, they are far more general and allow for comparison with laboratory experiments. In addition, they connect directly to the turbulent motion generated by the simulation. Simulations of accretion disks with and without self-gravity are performed and compared to the classic parameterization. The otherwise identical models are analyzed in detail. The achievable accretion rates and the evolution time scales of the central objects are of the same order compared to results obtained with the classic parameterization. To compensate for the drawback of two-dimensional models, rotationally symmetric and flat models are compared with each other. Both show similar behavior, which can be regarded as an indirect justification of the approach. In the flat models non-axisymmetric instabilities occur that affect the overall behavior of the disc strongly

    Conception des triacylglycérides à propriétés contrôlées: formulation et modélisation

    Get PDF
    Issues de ressources renouvelables, les huiles végétales (mélanges de triacylglycérols) sont des matières premières aux multiples applications dans divers secteurs, tels que l’industrie alimentaire, les lubrifiants, les solvants, les cosmétiques, la pharmacie, parmi autres. Pour faciliter le développement de produits utilisant de telles matières premières, le travail de thèse s’intéresse à la modélisation de l'équilibre de phases pour mélanges de triacylglycérols et la conception d’un logiciel prédictif de leurs propriétés. Les modèles employés sont totalement prédictifs et tiennent compte des polymorphes. La phase liquide et le polymorphe a sont supposés idéaux à l’inverse des polymorphes b et b’ dont les coefficients d’activités sont calculés à l’aide du modèle de Margules où les coefficients d’interactions binaires sont prédits à partir de la similarité des chaines d’acide gras sur le squelette glycérol. L'optimisation directe de l'énergie libre de Gibbs permet de calculer la quantité de solide dans les graisses ; propriété fondamentale corrélée à de nombreuses fonctionnalités de produits basés sur des huiles végétales. Le calcul de l'équilibre solide - liquide à plusieurs températures permet de simuler des courbes de fusion et des courbes de calorimétrie différentielle à balayage. L’influence sur ces courbes de modifications dans la structure moléculaire et de la composition des mélanges est étudier pour plusieurs systèmes et comparés avec des données expérimentales: triacylglycérols purs, mélanges binaires et ternaires de triacylglycérols, huiles végétales naturelles et mélanges d'huiles végétales impliquant des centaines de triacylglycérols. Des réactions d'interestérification chimique, largement utilisées pour modifier la composition et propriétés d'huiles et graisses, sont simulées et comparés avec des données expérimentales. Le bon accord avec les données expérimentales permet de valider l'outil informatique et son caractère prédictif permet d’envisager son utilisation pour des mélanges, températures et compositions encore non évaluées de façon à orienter les efforts expérimentaux vers les mélanges les plus prometteurs. ABSTRACT : The search for sustainable development is an incentive for renewable resources usage in chemical industry. Vegetable oils (triacylglycerol-based mixtures) are raw-materials that match this criterion and they are currently and potentially used in a wide range of sectors, such as: food industry, lubricants, solvents, cosmetics, pharmaceutical, among others. Aiming to aid product design using such raw-materials, this work deals with phase equilibrium modeling and the development of a computational tool for properties prediction. The models used are totally predictive and they deal with the existence of solid polymorphism. The liquid state and the crystals are treated as ideal phases. The activity coefficients of phases ’ and (notideal) are estimated using Margules model, for which the binary molecular interaction parameters are calculated in a predictive manner by means of correlations with the similarity degree between fatty acids chains in the glycerol. By direct optimization of Gibbs Free Energy, the Solid Fat Content is computed, a fundamental property for vegetable oils–based products functionality. The results of phase equilibrium in different temperatures allow simulating melting curves and Differential Scanning Calorimetry curves, allowing a computational evaluation of how molecular structure and composition changes affect desired properties. The calculated results were applied and compared with experimental data in a wide range of systems: pure systems, binary and ternary triacylglycerol mixtures, natural vegetable oils and mixture of vegetable oils (hundreds of components). Chemical interesterification reaction, widely applied to change fats and oils composition and properties, were also simulated and the results compared with experimental data in different compositions and temperatures. The good agreement between computational results and experimental data enables the computational tool validation and its predictive nature makes it suitable for the study of mixtures in temperatures and compositions not yet evaluated. Consequently, the experimental efforts (cost and time) can be concentrated on the most promised molecules/mixtures. RESSUMO : A busca pelo desenvolvimento sustentável é um incentivo para o uso de recursos renováveis na indústria química. Óleos vegetais (misturas de triacilgliceróis) são matérias-primas que atendem a este critério e apresentam aplicações atuais e potenciais em diversos setores, tais como indústria de alimentos, lubrificantes, solventes, cosméticos, farmacêutica, dentre outros. Com o objetivo de auxiliar no desenvolvimento de produtos utilizando tais matérias-primas, o presente trabalho trata da modelagem do equilíbrio de fases em misturas de triacilgliceróis e do desenvolvimento de uma ferramenta computacional preditiva de propriedades. Os modelos usados são totalmente preditivos e consideram a existência de polimorfismo na fase sólida. O estado líquido e o polimorfo são considerados ideais. Os coeficientes de atividade das fases e (não-ideais) são estimados através do modelo de Margules, no qual os coeficientes de interação molecular binária são calculados de forma preditiva através de correlações com o grau de similaridade entre as cadeias de ácidos graxos no glicerol. Através da otimização direta da Energia Livre de Gibbs, é calculado o Conteúdo de Gordura Sólida, uma propriedade fundamental para funcionalidade de produtos baseados em óleos vegetais. Através do cálculo do equilíbrio de fases em diversas temperaturas são simuladas curvas de fusão e curvas de Calorimetria Exploratória Diferencial, permitindo uma avaliação computacional do efeito que alterações na estrutura molecular e composição apresentam nas propriedades de interesse. Os resultados calculados foram aplicados e comparados com dados experimentais em diversos sistemas: triacilgliceróis puros, misturas binárias e ternárias de triacilgliceróis, óleos vegetais naturais e misturas de diversos óleos vegetais (centenas de triacilgliceróis). Reações de interesterificação química, amplamente utilizadas para alterar a composição e propriedades de óleos e gorduras, foram igualmente simuladas e os resultados comparados com dados experimentais em diversas composições e temperaturas. A boa concordância entre os dados simulados e experimentais permite validar a ferramenta computacional e seu caráter preditivo a torna útil no estudo de misturas em temperaturas e composições ainda não avaliadas, de forma que os esforços experimentais (custo e tempo) possam ser direcionados às misturas mais promissoras
    corecore