Including Gravity in the Aneurysm Model


I am trying to include gravity in the aneurysm model. I have tried to include the GuoExternalForceBGKdynamics with not much luck. I get alot of compilation errors. Any assistance in how to implement this model properly would be appreciated. I would like to add this model while including the LES turbulence model. I really get tripped up when trying to add both.

Thanks and Kind Regards,

Muaaz Bhamjee

1 Like

Hi,Muaaz Bhamjee
I would like to add LES turbulence model to aneurysm model.I wanted to know if you were successful?Can you tell me how you do it?
Thanks and Kind Regards,

Dear Guo Weiqi,

Apologies for the delayed response, I was on vacation. I did add it in successfully using the following code (I have included the earlier code lines so that you can see where I placed the additional code):

   // The aneurysm simulation is an interior (as opposed to exterior) flow problem. For
//   this reason, the lattice nodes that lay inside the computational domain must
//   be identified and distinguished from the ones that lay outside of it. This is
//   handled by the following voxelization process.
const int flowType = voxelFlag::inside;
VoxelizedDomain3D<T> voxelizedDomain (
        boundary, flowType, extraLayer, borderWidth, extendedEnvelopeWidth, blockSize );
if (performOutput) {
    pcout << getMultiBlockInfo(voxelizedDomain.getVoxelMatrix()) << std::endl;

MultiScalarField3D<int> flagMatrix((MultiBlock3D&)voxelizedDomain.getVoxelMatrix());
setToConstant(flagMatrix, voxelizedDomain.getVoxelMatrix(),
              voxelFlag::inside, flagMatrix.getBoundingBox(), 1);
setToConstant(flagMatrix, voxelizedDomain.getVoxelMatrix(),
              voxelFlag::innerBorder, flagMatrix.getBoundingBox(), 1);
pcout << "Number of fluid cells: " << computeSum(flagMatrix) << std::endl;
pcout << "Voxelisation Complete" << std::endl;

T cSmago = 0.14;
Dynamics<T,DESCRIPTOR>* dynamics = 0;
 if (useIncompressible) {
   dynamics = new GuoExternalForceBGKdynamics<T,DESCRIPTOR>(omega); // In this model velocity equals momentum.
   // setExternalVector(flagMatrix, voxelizedDomain.getVoxelMatrix(), externalForce, externalForce);
   dynamics = new SmagorinskyBGKdynamics<T,DESCRIPTOR>(omega, cSmago);  
else {
   // dynamics = new SmagorinskyBGKdynamics<T,DESCRIPTOR>(omega, cSmago);
   dynamics = new GuoExternalForceSmagorinskyBGKdynamics<T,DESCRIPTOR>(omega, cSmago);

{ }

I hope that this helps.

You will notice that I have commented out some lines as I experimented with various options. I eventually settled on the GuoExternalForceSmagorinskyBGKdynamics becuase I included gravity as an external body force as well.



Dear Muaaz,
Iā€™m sorry for not replying to you in time.Thank you very much for your help. It is very helpful to me.
Guo Weiqi