From 6a87b11091eb0013fa3a45b1af7a16686cdcd088 Mon Sep 17 00:00:00 2001 From: Christophe Geuzaine <cgeuzaine@ulg.ac.be> Date: Thu, 15 Mar 2018 22:19:13 +0100 Subject: [PATCH] pp --- PotentialFlow/magnus.pro | 56 +++++++++++++++++++++++----------------- 1 file changed, 33 insertions(+), 23 deletions(-) diff --git a/PotentialFlow/magnus.pro b/PotentialFlow/magnus.pro index d3fa9a0..eb0252e 100644 --- a/PotentialFlow/magnus.pro +++ b/PotentialFlow/magnus.pro @@ -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, -- GitLab