The SPARK simulation environment is an object based simulation environment. Its objects are equations or systems of equations. Creating SPARK objects requires from the user to write SPARK syntax and C code. Hooking objects together requires from the user to specify their common variables. Then SPARK creates a C program that solves for the specified problem. The first task of creating SPARK objects and C code is automated by use of an interface written in MACSYMA or MAPLE, both well known computer algebra languages. The second task of generating a global simulation specification hooking these objects together is automated by a tool written in C that creates SPARK syntax ?hooking together identical cells of arbitrary complexity, taking into count the way the cells' interface have to be connected. These tools are applied to the problem of 3-D air flow inside a zone, itself subdivided in subzones where mass and energy balances are performed, and between which air flow equations are implemented, as proposed by other authors. Stack effect is taken into count, as well as the perfect gas law. The problem is nonlinear and hard to solve, due to the square root behavior of the mass flow equations between zones. The implementation of this known nonlinear model into SPARK is fully automated. Results and performance are presented along with the precautions to be taken while specifying the equations (since the solution technique is determined by SPARK itself unless the user constrains the solution techniques by forbidding certain operations). In our case, we order the problem so that the only iteration variables chosen by SPARK are pressures and temperatures, thus avoiding the densities.Various cases are examined. Partition of the zone into 8, 27 and 64 subzones is automatically modeled and simulated. This kind of partitioning, halfway between global lumped formulations and finite differences approaches, combines accur acy with computational tractability. The advantages of object based approaches to this particular problem are then discussed. Code reusability, ease of modification and full modularity are emphasized.
Application of the spark environment to 3D air flow problems
Year:
1993
Bibliographic info:
Building Simulation, Australia, 1993, p. 471-477