LagrangianParticleTracker manually define flow density and dynamic viscosity

Hey all,

I’m attempting to use LagrangianParticleTracker (LPT) with an XDMF dataset which only has velocity flow data and no dynamic viscosity or flow density arrays. Is there a way to amend the XDMF dataset adding dynamic viscosity and flow density?

FlowExample XDMFData

Left is the example LPT data using an “.vtm” file, right is my “.xdmf” file.

I generate the XDMF flow data from FEniCS and from my research, it does not seem possible to add double data arrays such as “FlowDensity” or “FlowDynamicViscosity” when exporting. Is this something I can add once imported into Paraview using a python script for example? Or can I request a “Lagrangian Flow Helper” similar to the “Lagrangian Seed Helper” and “Lagrangian Surface Helper” to allow users to manually assign dynamic viscosity and/or flow density?

Many thanks,

You could indeed use the helper to create the arrays, but are you sure you want to use the LPT here ? Are you using your own models ? Why not using the Stream Tracer ?

Hey Mathieu,

How would I go about creating the arrays? There would be a flow density parameter of 998 kg/m3 and a dynamic viscosity parameter of 1e-3 mPa/s to be added.

I would like to use LPT over stream tracers/particle tracer/etc as I want to model particle separation within a microchannel. My system models Dean Drag forces important for separation of particles. This occurs where secondary flow can lift and drag particles based on their size and density. Changing the flow rate, particle size or density can affect where particles move within the microchannel perpendicular to flow. Other stream tracers will only model the dominant flow and ignore the secondary flow effects fundamental for modelling the Dean Drag forces for separation and give the same result regardless of particle size and density. Below are some images of second flow demonstrating Dean Drag forces and stream tracers which lose all secondary flow information.

If I have misunderstood and there is a better way to achieve this modelling, please let me know. I am aiming for something similar, if not the same as this implementation in Comsol.

Images are a 500x200 micrometre channel demonstrating Dean Drag forces, a 200x200 micrometre channel demonstrating Dean Drag forces and finally stream tracers without any particle specific parameters.

You indeed need the LPT for this but you would still need to implement the model you just described in a dedicated plugin.

Nonetheless, adding static values using the LagrangianFlowHelper should be trivial.

Yes, I agree it should be trivial but how do I add static values?

  • I do not believe a “LagrangianFlowHelper” exists. I was suggesting “LagrangianFlowHelper” should be implemented for this user case I have identified. Apologies for the confusion caused. I am using LagrangianParticleTracker V1.0
  • I have an XDMF which I cannot add static values for flow dynamic viscosity and flow density before importing into ParaView. Can I assign static values in ParaView? Please provide a step by step guide how I would do so.

Many thanks,

First picture presents the LagrangianParticleTracker V1.0 plugin filters available when enabled. There is no “LagrangianFlowHelper” available. Second picture shows unassigned flow dynamic viscosity and flow density. When clicking, the box highlights but no user input is allowed.

Right ! My bad !

You can just use the Calculator filter on your flow to create statis Density and DynamicViscosity.

Once again, these parameters are specific to the matida model, at some point you will have to implement your own model.

Hey Mathieu,

No problem, thanks for solving the issue! I will mark this as solved as I have managed to get LPT working and generate particles tracks and particle interactions. I want to get a basic working model with the Matida model and focus on a custom model for my problem.

Unfortunately, due to my implementation or the implementation of the LPT surface, it reflects particles along the same trajectory at which it hit the surface. This could be due to negative flow/negative particle trajectory at an angle which the LPT is not accustom to. Regardless, I will try simpler microchannel curves and work towards solving this large spiral. If all else fails, I will open a new topic in the near future once I have a simplified version as it is a new, separate issue.

Many thanks,

Below are images of a single particle bouncing with the same trajectory. Images were simulated using the LPT package, 20 micrometre particle size, 1.055 kg/m3 particle density, 0.147 m/s bulk flow rate, 998 kg/m3 flow density and 0.001 mPa/s flow dynamic viscosity. The first image is from time step 500 and the final image is step 1.