Injection of particles from surfaces direction
Now, if no normal is provided to an injection in the input file, the velocity direction of the particles is chosen to be the surface normal. This allows to inject particles from curves, corners... without having to provide a direction or declaring multiple injections.
This commit is contained in:
parent
3646474d3d
commit
bc2c29092a
4 changed files with 44 additions and 20 deletions
|
|
@ -1140,6 +1140,7 @@ MODULE moduleInput
|
|||
CHARACTER(:), ALLOCATABLE:: name
|
||||
REAL(8):: v
|
||||
REAL(8), ALLOCATABLE:: T(:), normal(:)
|
||||
LOGICAL:: fixDirection
|
||||
REAL(8):: flow
|
||||
CHARACTER(:), ALLOCATABLE:: units
|
||||
INTEGER:: physicalSurface
|
||||
|
|
@ -1160,11 +1161,18 @@ MODULE moduleInput
|
|||
CALL config%get(object // '.v', v, found)
|
||||
CALL config%get(object // '.T', T, found)
|
||||
CALL config%get(object // '.n', normal, found)
|
||||
IF (found) THEN
|
||||
fixDirection = .TRUE.
|
||||
ELSE
|
||||
fixDirection = .FALSE.
|
||||
ALLOCATE(normal(1:3))
|
||||
normal = 0.D0
|
||||
END IF
|
||||
CALL config%get(object // '.flow', flow, found)
|
||||
CALL config%get(object // '.units', units, found)
|
||||
CALL config%get(object // '.physicalSurface', physicalSurface, found)
|
||||
|
||||
CALL inject(i)%init(i, v, normal, T, flow, units, sp, physicalSurface)
|
||||
CALL inject(i)%init(i, v, normal, fixDirection, T, flow, units, sp, physicalSurface)
|
||||
|
||||
CALL readVelDistr(config, inject(i), object)
|
||||
|
||||
|
|
@ -1240,13 +1248,12 @@ MODULE moduleInput
|
|||
|
||||
SELECT CASE(fvType)
|
||||
CASE ("Maxwellian")
|
||||
v = inj%vMod*inj%n(i)
|
||||
T = inj%T(i)
|
||||
CALL initVelDistMaxwellian(inj%v(i)%obj, v, t, m)
|
||||
CALL initVelDistMaxwellian(inj%v(i)%obj, t, m)
|
||||
|
||||
CASE ("Delta")
|
||||
v = inj%vMod*inj%n(i)
|
||||
CALL initVelDistDelta(inj%v(i)%obj, v)
|
||||
CALL initVelDistDelta(inj%v(i)%obj)
|
||||
|
||||
CASE DEFAULT
|
||||
CALL criticalError("No velocity distribution type " // fvType // " defined", 'readVelDistr')
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue