Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Development
openfoam
Commits
1a13cd27
Commit
1a13cd27
authored
Apr 01, 2019
by
sergio
Committed by
Andrew Heather
Apr 01, 2019
Browse files
ENH: Adding new Gaussian power profile for laser
parent
33894bf8
Changes
2
Hide whitespace changes
Inline
Side-by-side
applications/solvers/multiphase/icoReactingMultiphaseInterFoam/laserDTRM/laserDTRM.C
View file @
1a13cd27
...
...
@@ -63,6 +63,7 @@ Foam::radiation::laserDTRM::powerDistNames_
{
powerDistributionMode
::
pdGaussian
,
"Gaussian"
},
{
powerDistributionMode
::
pdManual
,
"manual"
},
{
powerDistributionMode
::
pdUniform
,
"uniform"
},
{
powerDistributionMode
::
pdGaussianPeak
,
"GaussianPeak"
},
};
...
...
@@ -74,6 +75,11 @@ Foam::scalar Foam::radiation::laserDTRM::calculateIp(scalar r, scalar theta)
const
scalar
power
=
laserPower_
->
value
(
t
);
switch
(
mode_
)
{
case
pdGaussianPeak
:
{
return
I0_
*
exp
(
-
2
.
0
*
sqr
(
r
)
/
sqr
(
sigma_
));
break
;
}
case
pdGaussian
:
{
scalar
I0
=
power
/
(
mathematical
::
twoPi
*
sqr
(
sigma_
));
...
...
@@ -196,6 +202,12 @@ void Foam::radiation::laserDTRM::initialise()
switch
(
mode_
)
{
case
pdGaussianPeak
:
{
I0_
=
get
<
scalar
>
(
"I0"
);
sigma_
=
get
<
scalar
>
(
"sigma"
);
break
;
}
case
pdGaussian
:
{
sigma_
=
get
<
scalar
>
(
"sigma"
);
...
...
@@ -346,6 +358,7 @@ Foam::radiation::laserDTRM::laserDTRM(const volScalarField& T)
),
sigma_
(
0
),
I0_
(
0
),
laserPower_
(
Function1
<
scalar
>::
New
(
"laserPower"
,
*
this
)),
powerDistribution_
(),
...
...
@@ -442,6 +455,7 @@ Foam::radiation::laserDTRM::laserDTRM
),
sigma_
(
0
),
I0_
(
0
),
laserPower_
(
Function1
<
scalar
>::
New
(
"laserPower"
,
*
this
)),
powerDistribution_
(),
...
...
applications/solvers/multiphase/icoReactingMultiphaseInterFoam/laserDTRM/laserDTRM.H
View file @
1a13cd27
...
...
@@ -87,7 +87,8 @@ public:
{
pdGaussian
,
pdManual
,
pdUniform
pdUniform
,
pdGaussianPeak
};
...
...
@@ -153,6 +154,9 @@ private:
//- Sigma deviation
scalar
sigma_
;
//- Peak flux for GaussianPeak mode
scalar
I0_
;
//- Power
autoPtr
<
Function1
<
scalar
>>
laserPower_
;
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment