Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add simple model to BoltzmannMFX #3

Open
bjpalmer opened this issue Mar 9, 2021 · 5 comments
Open

Add simple model to BoltzmannMFX #3

bjpalmer opened this issue Mar 9, 2021 · 5 comments

Comments

@bjpalmer
Copy link
Collaborator

bjpalmer commented Mar 9, 2021

Take simple model documented in docs/models/model1/model1.tex and add it to BoltzmannMFX.

@bjpalmer
Copy link
Collaborator Author

The transfer of material between the continuum fields and the particles is described in the bmx_calc_txfr_fluid (transfer from particles to continuum fields) and bmx_calc_txfr_particles (transfer from continuum fields to particles). Both these routines are located in bmx_calc_txfr.cpp located in src/des.

@bjpalmer
Copy link
Collaborator Author

The number of chemical species in the fluid is defined in bmx_fluid_parms.H and the number of chemical species inside a particle is probably defined in bmx_chem_species_parms.H (not 100% sure of this). No chemical species inside the particles seemed to be defined in the inputs file for the 1-particle test case in exec. Species are defined in the fluid.

@asalmgren
Copy link
Collaborator

asalmgren commented Mar 11, 2021 via email

@bjpalmer
Copy link
Collaborator Author

I'm trying to generalize these data structures to handle a more generic set of cells. I've defined two new enumerations:

/**

  • Generic set of indices for variables characterizing a cell. Specific real
  • properties of a cell are enumerated first, followed by the first index of an
  • uncharacterized block of real variables that can be fed to other routines.
  • The indices below assume that the most generic cell is an ellipsoid with axes
  • a, b, c oriented in space by three Euler angles and acted upon by a linear
  • force on the center of mass and a torque. The cell is also characterized by a
  • volume V. The cell has linear velocity and angular velocity and the cell
  • volume is also growing or shrinking with some rate. For spherical cells,
  • a=b=c=radius and the Euler angles, rotation velocity and torques are all
  • zero.
    */
    struct realIdx
    {
    enum { // Locations of real particle data stored in particle type
    a_size, // first ellipsoid dimension
    b_size, // second ellipsoid dimension
    c_size, // third ellipsoid dimension
    psi, // first Euler angle
    theta, // second Euler angle
    phi, // third Euler angle
    vol, // cell volume
    velx, // x-component of linear velocity
    vely, // y-component of linear velocity
    velz, // z-component of linear velocity
    wx, // x-component of angular velocity
    wy, // y-component of angular velocity
    wz, // z-component of angular velocity
    fx, // x-component of linear force
    fy, // y-component of linear force
    fz, // z-component of linear force
    taux, // x-component of torque
    tauy, // y-component of torque
    tauz, // z-component of torque
    dvdt, // rate of change of the volume
    first_data // index of first value in uncharacterized block
    };
    };

/**

  • Generic set of indices for integer variables characterizing a cell. Specific
  • integers are listed first followed by an uncharacterized block of integers
  • that can be fed to other routines. The total number of real and integer
  • variables in this block and the readIdx block are stored in this struct.
    */
    struct intIdx
    {
    enum { // Locations of integer data stored in particle type
    size_real, // Size of uncharacterized block of real data
    size_int, // Size of uncharacterized block of intger data
    first_data, // index of first value of uncharacterized block
    };
    };

The idea is that the mechanics are hardwired to describe a general ellipsoid interacting with other ellipsoids. Simpler geometric models (e.g. spheres) are subsets of this ellipsoidal model. The chemistry model is arbitrary and consists of a collections of real fields (chemical species) that are unpacked by a chemistry module. The readIdx::first_data index points to the start of the block of real data for each particle and the size of the block is stored in intIdx::size_real. The integer variables are similar. Again, additional integer variables describing the cell state are stored in a block of data that can be accessed using the intIdx::first_data variable.

@bjpalmer
Copy link
Collaborator Author

The simple ABC model has been added to BoltzmannMFX and is running for short time periods. It exhibits cell growth and division and also contains mechanical interactions between cells. The behaviors included in the simulation so far are

  • Modification of chemical species due to reactions
  • Cell division when cells reach a size threshold
  • Motion of cells due to mechanical interactions

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants