First commit of branch performance:
Bugs fixed: - Solved an issue with particles being injected with infinite velocity resulting in Inf velocity in some cells of the output files. - Particles are now equally distributed in cylindrical geometry along the radial direction. New features: - Particles now have their own weight that is recalculated when the particle moves to a new cell. This avoid the reduction of density at r = 0. Cases: - Added a case of Argon flow around a cylinder to measure performance and future improvements.
This commit is contained in:
parent
bd7e8b040b
commit
05f5adcfe1
10 changed files with 5003 additions and 28 deletions
|
|
@ -404,43 +404,47 @@ MODULE moduleMeshCyl
|
|||
tensorS = outerProduct(part%v, part%v)
|
||||
|
||||
vertex => self%n1%output(part%pt)
|
||||
vertex%den = vertex%den + w_p(1)
|
||||
vertex%mom(:) = vertex%mom(:) + w_p(1)*part%v(:)
|
||||
vertex%tensorS(:,:) = vertex%tensorS(:,:) + w_p(1)*tensorS
|
||||
vertex%den = vertex%den + part%weight*w_p(1)
|
||||
vertex%mom(:) = vertex%mom(:) + part%weight*w_p(1)*part%v(:)
|
||||
vertex%tensorS(:,:) = vertex%tensorS(:,:) + part%weight*w_p(1)*tensorS
|
||||
|
||||
vertex => self%n2%output(part%pt)
|
||||
vertex%den = vertex%den + w_p(2)
|
||||
vertex%mom(:) = vertex%mom(:) + w_p(2)*part%v(:)
|
||||
vertex%tensorS(:,:) = vertex%tensorS(:,:) + w_p(2)*tensorS
|
||||
vertex%den = vertex%den + part%weight*w_p(2)
|
||||
vertex%mom(:) = vertex%mom(:) + part%weight*w_p(2)*part%v(:)
|
||||
vertex%tensorS(:,:) = vertex%tensorS(:,:) + part%weight*w_p(2)*tensorS
|
||||
|
||||
vertex => self%n3%output(part%pt)
|
||||
vertex%den = vertex%den + w_p(3)
|
||||
vertex%mom(:) = vertex%mom(:) + w_p(3)*part%v(:)
|
||||
vertex%tensorS(:,:) = vertex%tensorS(:,:) + w_p(3)*tensorS
|
||||
vertex%den = vertex%den + part%weight*w_p(3)
|
||||
vertex%mom(:) = vertex%mom(:) + part%weight*w_p(3)*part%v(:)
|
||||
vertex%tensorS(:,:) = vertex%tensorS(:,:) + part%weight*w_p(3)*tensorS
|
||||
|
||||
vertex => self%n4%output(part%pt)
|
||||
vertex%den = vertex%den + w_p(4)
|
||||
vertex%mom(:) = vertex%mom(:) + w_p(4)*part%v(:)
|
||||
vertex%tensorS(:,:) = vertex%tensorS(:,:) + w_p(4)*tensorS
|
||||
vertex%den = vertex%den + part%weight*w_p(4)
|
||||
vertex%mom(:) = vertex%mom(:) + part%weight*w_p(4)*part%v(:)
|
||||
vertex%tensorS(:,:) = vertex%tensorS(:,:) + part%weight*w_p(4)*tensorS
|
||||
|
||||
|
||||
END SUBROUTINE scatterQuad
|
||||
|
||||
RECURSIVE SUBROUTINE findCellCylQuad(self, part)
|
||||
RECURSIVE SUBROUTINE findCellCylQuad(self, part, oldCell)
|
||||
USE moduleSpecies
|
||||
IMPLICIT NONE
|
||||
|
||||
CLASS(meshVolCylQuad), INTENT(in):: self
|
||||
CLASS(meshVol), OPTIONAL, INTENT(in):: oldCell
|
||||
CLASS(particle), INTENT(inout):: part
|
||||
REAL(8):: xLog(1:2)
|
||||
REAL(8):: xLogArray(1:4)
|
||||
CLASS(*), POINTER:: nextElement
|
||||
INTEGER:: nextInt
|
||||
|
||||
|
||||
xLog = self%phy2log(part%r(1:2))
|
||||
IF (self%inside(xLog(1), xLog(2))) THEN
|
||||
!Checks if particle is inside of current cell
|
||||
IF (PRESENT(oldCell)) THEN
|
||||
!If oldCell, recalculate particle weight, as particle has entered a new cell.
|
||||
part%weight = part%weight*oldCell%volume/self%volume
|
||||
END IF
|
||||
part%e_p = self%n
|
||||
part%xLog = xLog
|
||||
ELSE
|
||||
|
|
@ -464,7 +468,7 @@ MODULE moduleMeshCyl
|
|||
SELECT TYPE(nextElement)
|
||||
CLASS IS(meshVolCyl)
|
||||
!Particle moved to new cell, repeat find procedure
|
||||
CALL nextElement%findCell(part)
|
||||
CALL nextElement%findCell(part, self)
|
||||
|
||||
CLASS IS (meshEdgeCyl)
|
||||
!Particle encountered an edge, execute boundary
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue