Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
tutorials
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
documentation
tutorials
Commits
6a87b110
There was a problem fetching the pipeline summary.
Commit
6a87b110
authored
7 years ago
by
Christophe Geuzaine
Browse files
Options
Downloads
Patches
Plain Diff
pp
parent
51bae575
No related branches found
No related tags found
No related merge requests found
Pipeline
#
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
PotentialFlow/magnus.pro
+33
-23
33 additions, 23 deletions
PotentialFlow/magnus.pro
with
33 additions
and
23 deletions
PotentialFlow/magnus.pro
+
33
−
23
View file @
6a87b110
...
...
@@ -17,8 +17,8 @@
File > Open > magnus.pro
Run (button at the bottom of the left panel)
------------------------------------------------------------------- */
/*
This model solves a 2D potential flow around a cylinder or a naca airfoil
/*
This model solves a 2D potential flow around a cylinder or a naca airfoil
placed in a uniform "V_infinity" flow. Potential flows are defined by
V = grad phi => curl V = 0
...
...
@@ -244,12 +244,11 @@ Resolution{
// While[]{} : iteration
// Print[{}, Format ..., File ...] : formatted display
// A pseudo-Newton iteration is implemented here
// to determine the value of Dmdt (in the Airfoil case)
// that verifies Kutta's condition.
// The run-time variable $newDmdt is used in Generate[A]
// whereas $circ, $dmdt, $argV and $phiTrailing are evaluated
// by the PostOperation[Trailing].
// A pseudo-Newton iteration is implemented here to determine the value
// of Dmdt (in the Airfoil case) that verifies Kutta's condition. The
// run-time variable $newDmdt is used in Generate[A] whereas $circ,
// $dmdt, $argV and $phiTrailing are evaluated by the
// PostOperation[Trailing].
DeleteFile
[
"KJiter.txt"
];
...
...
@@ -286,32 +285,43 @@ Resolution{
}
PostProcessing
{
{
Name
PotentialFlow
;
NameOfFormulation
PotentialFlow
;
{
Name
PotentialFlow
;
NameOfFormulation
PotentialFlow
;
Quantity
{
{
Name
phi
;
Value
{
Local
{
[
{
phi
}
]
;
In
Dom_Vh
;
Jacobian
Vol
;
}
}
}
Term
{
[
{
phi
}
]
;
In
Dom_Vh
;
Jacobian
Vol
;
}
}
}
{
Name
phiCont
;
Value
{
Local
{
[
{
phiCont
}
]
;
In
Dom_Vh
;
Jacobian
Vol
;
}
}
}
Term
{
[
{
phiCont
}
]
;
In
Dom_Vh
;
Jacobian
Vol
;
}
}
}
{
Name
phiDisc
;
Value
{
Local
{
[
{
phiDisc
}
]
;
In
Dom_Vh
;
Jacobian
Vol
;
}
}
}
Term
{
[
{
phiDisc
}
]
;
In
Dom_Vh
;
Jacobian
Vol
;
}
}
}
{
Name
velocity
;
Value
{
Local
{
[
{
d
phi
}
];
In
Dom_Vh
;
Jacobian
Vol
;
}
}
}
Term
{
[
{
d
phi
}
];
In
Dom_Vh
;
Jacobian
Vol
;
}
}
}
{
Name
normVelocity
;
Value
{
Local
{
[
Norm
[{
d
phi
}]
];
In
Dom_Vh
;
Jacobian
Vol
;
}
}
}
Term
{
[
Norm
[{
d
phi
}]
];
In
Dom_Vh
;
Jacobian
Vol
;
}
}
}
{
Name
pressure
;
Value
{
Local
{
[
-
0.5
*
rho
[]
*
SquNorm
[
{
d
phi
}
]];
In
Dom_Vh
;
Jacobian
Vol
;
}
}
}
Term
{
[
-
0.5
*
rho
[]
*
SquNorm
[
{
d
phi
}
]];
In
Dom_Vh
;
Jacobian
Vol
;
}
}
}
{
Name
Angle
;
Value
{
Local
{
[
argVTrail
[{
d
phi
}]
];
In
Dom_Vh
;
Jacobian
Vol
;
}
}
}
Term
{
[
argVTrail
[{
d
phi
}]
];
In
Dom_Vh
;
Jacobian
Vol
;
}
}
}
{
Name
Circ
;
Value
{
Local
{
[
{
Circ
}
];
In
Sur_Cut
;
}
}
}
{
Name
Circ
;
Value
{
Term
{
[
{
Circ
}
];
In
Sur_Cut
;
}
}
}
{
Name
Dmdt
;
Value
{
Local
{
[
{
Dmdt
}
];
In
Sur_Cut
;
}
}
}
{
Name
Dmdt
;
Value
{
Term
{
[
{
Dmdt
}
];
In
Sur_Cut
;
}
}
}
// Kutta-Jukowski approximation for Lift
{
Name
LiftKJ
;
Value
{
Local
{
[
-
rho
[]
*
{
Circ
}
*
Velocity
];
In
Sur_Cut
;
}
}
}
{
Name
LiftKJ
;
Value
{
Term
{
[
-
rho
[]
*
{
Circ
}
*
Velocity
];
In
Sur_Cut
;
}
}
}
// Lift computed with the real pressure field
{
Name
Lift
;
...
...
@@ -393,7 +403,7 @@ PostOperation{
}
PostOperation
{
// for the Airfoil model
{
Name
Trailing
;
NameOfPostProcessing
PotentialFlow
;
{
Name
Trailing
;
NameOfPostProcessing
PotentialFlow
;
Operation
{
Print
[
Circ
,
OnRegion
Sur_Cut
,
File
>
"KJiter.txt"
,
Format
Table
,
StoreInVariable
$
circ
,
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment