Particles Set

From AQUAgpusph
Jump to: navigation, search

Introduction

In AQUAgpusph the whole system of particles can be divided in different types, so called, particles set. Each particles set is loaded and saved in different files.

All the particles are marked with the Array variable iset, which indicated the particles set it belongs.

Particles sets can be used for a wide variety of purposes:

  • To create fluids with different properties, like viscosity, or density of reference.
  • To create independent bodies, for instance to independently move them, or to compute the forces on a particular boundary.
  • To create sensors.

Usage

Each particles set should be declared in the XML simulation input files by an independent section ParticlesSet, inside the main sphInput section. Within the ParticlesSet section, the attribute n should be provided to specify how many particles belong to the particles set (and therefore should be loaded from the input file). Let's check the following code (extracted from the standing wave example):

<?xml version="1.0" ?>
<sphInput>
    <ParticlesSet n="20200">
        <Scalar name="gamma" value="1.0" />
        <Scalar name="refd" value="1.0" />
        <Scalar name="visc_dyn" value="0.004" />
        <Scalar name="delta" value="0.0" />
 
        <Load format="ASCII" file="Fluid.dat" fields="r, normal, u, dudt, rho, drhodt, m, imove" />
        <Save format="VTK" file="output" fields="r, normal, u, dudt, rho, drhodt, m, p, imove" />
    </ParticlesSet>
</sphInput>

In this file, to be included from the main XML input file, a new particles set with 20200 particles is asked to be loaded from the ASCII file Fluid.dat, which contains the r, normal, u, dudt, rho, drhodt, m, imove fields for each particle (The columns should be sorted as it is specified).