Skip to content
Snippets Groups Projects
Commit 6a87b110 authored by Christophe Geuzaine's avatar Christophe Geuzaine
Browse files

pp

parent 51bae575
No related branches found
No related tags found
No related merge requests found
Pipeline #
......@@ -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,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment