Small change to injection and correction in write free current
This commit is contained in:
parent
da4645f4b8
commit
e2adc0e834
2 changed files with 5 additions and 5 deletions
|
|
@ -450,10 +450,10 @@ submodule(moduleMesh) boundaryEM
|
||||||
integer:: e
|
integer:: e
|
||||||
|
|
||||||
write(fileID, '(A)') self%name
|
write(fileID, '(A)') self%name
|
||||||
|
write(fileID, '(A,",",A)') 'Edge id', 'Electric Field (V m^-1)'
|
||||||
select type(self)
|
select type(self)
|
||||||
type is(boundaryEMFreeCurrent)
|
type is(boundaryEMFreeCurrent)
|
||||||
do e = 1, self%nEdges
|
do e = 1, self%nEdges
|
||||||
write(fileID, '(A,",",A)') 'Edge id', 'Electric Field (V m^-1)'
|
|
||||||
write(fileID, '('//fmtColInt//','//fmtColReal//')') self%edges(e)%obj%n, self%electricField(e)*EF_ref
|
write(fileID, '('//fmtColInt//','//fmtColReal//')') self%edges(e)%obj%n, self%electricField(e)*EF_ref
|
||||||
|
|
||||||
end do
|
end do
|
||||||
|
|
|
||||||
|
|
@ -576,13 +576,13 @@ submodule(moduleMesh) boundaryParticle
|
||||||
do n = 1, edge%nNodes
|
do n = 1, edge%nNodes
|
||||||
node => mesh%nodes(nodes(n))%obj
|
node => mesh%nodes(nodes(n))%obj
|
||||||
|
|
||||||
den_nodes(n) = node%output(s)%den/(node%v*Vol_ref*n_ref)
|
den_nodes(n) = node%output(s)%den/(node%v*Vol_ref*n_ref)
|
||||||
mom_nodes(n) = dot_product(node%output(s)%mom, edge%normal)/(node%v*Vol_ref*n_ref)
|
mom_nodes(n) = -dot_product(node%output(s)%mom, edge%normal)/(node%v*Vol_ref*n_ref)
|
||||||
|
|
||||||
end do
|
end do
|
||||||
|
|
||||||
den_center = edge%gatherF(edge%centerXi(), edge%nNodes, den_nodes)
|
den_center = edge%gatherF(edge%centerXi(), edge%nNodes, den_nodes)
|
||||||
if (den_center > 1.0d-10) then
|
if (den_center > 1.0d-12) then
|
||||||
mom_center = edge%gatherF(edge%centerXi(), edge%nNodes, mom_nodes)
|
mom_center = edge%gatherF(edge%centerXi(), edge%nNodes, mom_nodes)
|
||||||
vel_center = mom_center / den_center
|
vel_center = mom_center / den_center
|
||||||
|
|
||||||
|
|
@ -604,7 +604,7 @@ submodule(moduleMesh) boundaryParticle
|
||||||
alpha = vel_rest - vel_incident
|
alpha = vel_rest - vel_incident
|
||||||
|
|
||||||
! Apply correction with a factor of 0.1 to avoid fast changes
|
! Apply correction with a factor of 0.1 to avoid fast changes
|
||||||
self%velocity_shift(edge%n) = self%velocity_shift(edge%n) + 1.0d-2 * alpha
|
self%velocity_shift(edge%n) = self%velocity_shift(edge%n) + 1.0d-3 * alpha
|
||||||
|
|
||||||
deallocate(den_nodes)
|
deallocate(den_nodes)
|
||||||
deallocate(mom_nodes)
|
deallocate(mom_nodes)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue