CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > SU2

Multiple curves in same plot of volume output

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes
  • 1 Post By bigfootedrockmidget

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   September 17, 2021, 09:07
Default Multiple curves in same plot of volume output
  #1
Senior Member
 
Arijit Saha
Join Date: Feb 2019
Location: Singapore
Posts: 132
Rep Power: 7
ari003 is on a distinguished road
Hello everyone,
Hope you all are doing good. I'm using SU2 for my numerical simulation and I noticed a very weird behavior while visualizing the volume output (cp, y+ etc).
For example if I consider the cp vs the x-cord it should be consisting of only line which is pretty basic but here I noticed two line pretty much overlapping on each other. I need to get rid of one line and plot a normal cp plot. I'm attaching the pic of the upper surface of airfoil and the cp curves. If anyone is aware of the solution please let me know with your idea, will be really helpful.
Quote:
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %
% SU2 configuration file %
% Case description: Unsteady periodic detached NACA0012 simulation %
% Author: Steffen Schotthöfer %
% Institution: TU Kaiserslautern %
% Date: Jan 21, 2020 %
% File Version 7.0.1 "Blackbird" (or newer) %
% %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

% ------------- DIRECT, ADJOINT, AND LINEARIZED PROBLEM DEFINITION ------------%
%
% Physical governing equations (EULER, NAVIER_STOKES, NS_PLASMA)
%
SOLVER= RANS
%
% Specify turbulent model (NONE, SA, SA_NEG, SST)
KIND_TURB_MODEL= SST
%
% Mathematical problem (DIRECT, CONTINUOUS_ADJOINT)
MATH_PROBLEM= DIRECT
%
TIME_DOMAIN = NO
%
% ------------------------- UNSTEADY SIMULATION -------------------------------%
%
%
% Numerical Method for Unsteady simulation(NO, TIME_STEPPING, DUAL_TIME_STEPPING-1ST_ORDER, DUAL_TIME_STEPPING-2ND_ORDER, TIME_SPECTRAL)
%TIME_MARCHING= DUAL_TIME_STEPPING-2ND_ORDER
%
% Time Step for dual time stepping simulations (s)
%TIME_STEP= 5e-4
%
% Maximum Number of physical time steps.
%TIME_ITER= 2200
%
% Number of internal iterations (dual time method)
%INNER_ITER= 100
%
% Restart after the transient phase has passed
RESTART_SOL = YES
%
% Specify unsteady restart iter
%RESTART_ITER = 6
% -------------------- COMPRESSIBLE FREE-STREAM DEFINITION --------------------%
%
% Mach number (non-dimensional, based on the free-stream values)
MACH_NUMBER= 0.8
%
% Angle of attack (degrees, only for compressible flows)
AOA= 0.0
%
% De-Dimensionalization
REF_DIMENSIONALIZATION = DIMENSIONAL
%
%FREESTREAM_OPTION= TEMPERATURE_FS
%
%FREESTREAM_PRESSURE= 101325.0
% Free-stream temperature (288.15 K by default)
FREESTREAM_TEMPERATURE= 293.0
%
% Reynolds number (non-dimensional, based on the free-stream values)
REYNOLDS_NUMBER= 1e+5
%
% Reynolds length (1 m by default)
REYNOLDS_LENGTH= 1.0
% --------------------------- VISCOSITY MODEL ---------------------------------%
%
% Viscosity model (SUTHERLAND, CONSTANT_VISCOSITY).
VISCOSITY_MODEL= SUTHERLAND
%
% Molecular Viscosity that would be constant (1.716E-5 by default)
MU_CONSTANT= 1.716e-05
%
% ---------------------- REFERENCE VALUE DEFINITION ---------------------------%
%
% Reference origin for moment computation
REF_ORIGIN_MOMENT_X = 0.25
REF_ORIGIN_MOMENT_Y = 0.00
REF_ORIGIN_MOMENT_Z = 0.00
%
% Reference length for pitching, rolling, and yawing non-dimensional moment
REF_LENGTH= 1.0
%
% Reference area for force coefficients (0 implies automatic calculation)
REF_AREA= 1.0
%
% -------------------- BOUNDARY CONDITION DEFINITION --------------------------%
%
% Navier-Stokes wall boundary marker(s) (NONE = no marker)
MARKER_HEATFLUX= ( wall_upper,0.0, wall_lower,0.0)
%
% Farfield boundary marker(s) (NONE = no marker)
MARKER_FAR= ( farfield)
%
% Marker(s) of the surface to be plotted or designed
MARKER_PLOTTING= (wall_upper)
%
%INC_INLET_TYPE= TOTAL_CONDITIONS
%MARKER_INLET = (inlet, 293, 101325.0, 1, 0.0, 0.0)
%
%INC_OUTLET_TYPE= PRESSURE_OUTLET
%MARKER_OUTLET = (outlet, 1e3)
%
% Marker(s) of the surface where the functional (Cd, Cl, etc.) will be evaluated
MARKER_MONITORING= (wall_upper, wall_lower)
%
% ------------- COMMON PARAMETERS DEFINING THE NUMERICAL METHOD ---------------%
%
% Numerical method for spatial gradients (GREEN_GAUSS, WEIGHTED_LEAST_SQUARES)
NUM_METHOD_GRAD= WEIGHTED_LEAST_SQUARES
%
% Courant-Friedrichs-Lewy condition of the finest grid
CFL_NUMBER= 10
%
% Adaptive CFL number (NO, YES)
CFL_ADAPT= NO
%
% Parameters of the adaptive CFL number (factor down, factor up, CFL min value,
% CFL max value )
CFL_ADAPT_PARAM= ( 1.5, 0.5, 1.0, 100.0 )
%
% Runge-Kutta alpha coefficients
RK_ALPHA_COEFF= ( 0.66667, 0.66667, 1.000000 )
%
%
% Linear solver for the implicit formulation (BCGSTAB, FGMRES)
%LINEAR_SOLVER= FGMRES
%
% Min error of the linear solver for the implicit formulation
%LINEAR_SOLVER_ERROR= 1E-6
%
% Max number of iterations of the linear solver for the implicit formulation
%LINEAR_SOLVER_ITER= 5
%
% Number of total iterations
ITER= 5000
%
% -------------------- FLOW NUMERICAL METHOD DEFINITION -----------------------%
%
% Convective numerical method (JST, LAX-FRIEDRICH, CUSP, ROE, AUSM, HLLC,
% TURKEL_PREC, MSW)
CONV_NUM_METHOD_FLOW= JST
%
% Spatial numerical order integration (1ST_ORDER, 2ND_ORDER, 2ND_ORDER_LIMITER)
%
% 1st, 2nd and 4th order artificial dissipation coefficients
JST_SENSOR_COEFF= ( 0.5, 0.01 )
%
% Time discretization (RUNGE-KUTTA_EXPLICIT, EULER_IMPLICIT, EULER_EXPLICIT)
TIME_DISCRE_FLOW= EULER_IMPLICIT
%
% -------------------- TURBULENT NUMERICAL METHOD DEFINITION ------------------%
%
% Convective numerical method (SCALAR_UPWIND)
CONV_NUM_METHOD_TURB= SCALAR_UPWIND
%
% Spatial numerical order integration (1ST_ORDER, 2ND_ORDER, 2ND_ORDER_LIMITER)
%
MUSCL_TURB= NO
%
% Time discretization (EULER_IMPLICIT)
TIME_DISCRE_TURB= EULER_IMPLICIT
%
% --------------------------- CONVERGENCE PARAMETERS --------------------------%
%
% Convergence criteria (CAUCHY, RESIDUAL)
CONV_CRITERIA= CAUCHY
%
CONV_FIELD= LIFT, DRAG
% Min value of the residual (log10 of the residual)
CONV_RESIDUAL_MINVAL= -2
%
% Start convergence criteria at iteration number
CONV_STARTITER= 10
%
% Number of elements to apply the criteria
CONV_CAUCHY_ELEMS= 50
%
% Epsilon to control the series convergence
CONV_CAUCHY_EPS= 1E-4
%
%
% ------------------------- INPUT/OUTPUT INFORMATION --------------------------%
%
HISTORY_WRT_FREQ_INNER=1
SCREEN_WRT_FREQ_INNER =1
%
% Mesh input file
MESH_FILENAME= qq2.su2
%
% Mesh input file format (SU2, CGNS, NETCDF_ASCII)
MESH_FORMAT= SU2
%
% Mesh output file
MESH_OUT_FILENAME= mesh_out.su2
%
% Restart flow input file
SOLUTION_FILENAME= restart_flow.dat
%
% Restart adjoint input file
SOLUTION_ADJ_FILENAME= restart_adj.dat
%
% Output file format (PARAVIEW, TECPLOT, STL)
OUTPUT_FILES= RESTART, PARAVIEW_ASCII, SURFACE_PARAVIEW_ASCII
%
% Output file convergence history (w/o extension)
CONV_FILENAME= history
%
% Output file restart flow
RESTART_FILENAME= restart_flow.dat
%
% Output file restart adjoint
RESTART_ADJ_FILENAME= restart_adj.dat
%
% Output file flow (w/o extension) variables
VOLUME_FILENAME= flow
%
% Output file surface flow coefficient (w/o extension)
SURFACE_FILENAME= surface_flow
%
%
SCREEN_OUTPUT = (INNER_ITER, WALL_TIME, RMS_PRESSURE, RMS_DENSITY, LIFT, DRAG)
%HISTORY_OUTPUT=(ITER,REL_RMS_RES,RMS_RES, AERO_COEFF,TAVG_AERO_COEFF, CAUCHY)
VOLUME_OUTPUT =(PRESSURE_COEFF, Y_PLUS, MACH)
%
Attached Images
File Type: jpg Screenshot from 2021-09-17 13-54-37.jpg (81.0 KB, 13 views)
ari003 is offline   Reply With Quote

Old   September 17, 2021, 13:00
Default
  #2
Member
 
Ravi
Join Date: May 2017
Posts: 32
Rep Power: 9
raviramesh10 is on a distinguished road
Quote:
Originally Posted by ari003 View Post
Hello everyone,
Hope you all are doing good. I'm using SU2 for my numerical simulation and I noticed a very weird behavior while visualizing the volume output (cp, y+ etc).
For example if I consider the cp vs the x-cord it should be consisting of only line which is pretty basic but here I noticed two line pretty much overlapping on each other. I need to get rid of one line and plot a normal cp plot. I'm attaching the pic of the upper surface of airfoil and the cp curves. If anyone is aware of the solution please let me know with your idea, will be really helpful.
Hi Arijit,

Hope this message finds you well. I am curious to know one thing, given that I am also performing a similar simulation. Would it be physical to use a volume output Cp when plotting a surface quantity such as pressure, which is calculated purely on the airfoil surface? The reason I mention this is because from my (limited) experience, I have plotted the Cp curve as a volume output before, and I did get some unphysical lines.

Another suggestion would be to use a dotted line in Paraview (which I assume is your post-processing software) instead of the solid line. Many a times, the correct trend is not plotted in an unsteady simulation because the same solution is iterated multiple times, and Paraview basically reads all time steps and plots the Cp variation on the same plot.

Hope one of these solutions helps your cause.

With warm regards,

Ravi
raviramesh10 is offline   Reply With Quote

Old   September 17, 2021, 14:34
Default
  #3
Senior Member
 
Arijit Saha
Join Date: Feb 2019
Location: Singapore
Posts: 132
Rep Power: 7
ari003 is on a distinguished road
Quote:
Originally Posted by raviramesh10 View Post
Hi Arijit,

Hope this message finds you well. I am curious to know one thing, given that I am also performing a similar simulation. Would it be physical to use a volume output Cp when plotting a surface quantity such as pressure, which is calculated purely on the airfoil surface? The reason I mention this is because from my (limited) experience, I have plotted the Cp curve as a volume output before, and I did get some unphysical lines.

Another suggestion would be to use a dotted line in Paraview (which I assume is your post-processing software) instead of the solid line. Many a times, the correct trend is not plotted in an unsteady simulation because the same solution is iterated multiple times, and Paraview basically reads all time steps and plots the Cp variation on the same plot.

Hope one of these solutions helps your cause.

With warm regards,

Ravi
Hi, here in SU2 the volume output signifies any quantity which you can visualize in post-processing tool. I guess with flow.vtk (default name) you get to visualize the parameters corresponding to whole surface( in my case 2-D) while with surface_flow.vtk it gives the values against the wall(in my case it is airfoil). Hope this makes sense to you as well.

Also, I m running my simulation with steady case.

Bdw Ravi, if you figured out the unphysical behaviour of your cp with volume output can you share the solution here as well?
ari003 is offline   Reply With Quote

Old   September 18, 2021, 06:11
Default
  #4
Senior Member
 
Arijit Saha
Join Date: Feb 2019
Location: Singapore
Posts: 132
Rep Power: 7
ari003 is on a distinguished road
Hello SU2 users,
After spending couple of hours behind this issue somehow I was able to figure out the reason behind this multiple curves.
I have put a pic in the attachment section and there you can notice that in between two successive geometry points there are multiple cells (tri mesh) projecting a point on the curve. To be clear, I used gmsh as the meshing tool and used distance & threshold command to create the mesh.
So, after the simulation when the surface.vtk file was opened I observed that the values corresponding to geometrical points(circle marked in pic) and projecting point(due to mesh) were separately noted in the file, which usually supposed to be in a continuous manner.
It can be separately plotted with Python or MATLAB not a big issue but I'm wondering is this quite common in SU2 or can it be eradicated somehow?
Attached Images
File Type: jpg mesh.jpg (146.8 KB, 10 views)
ari003 is offline   Reply With Quote

Old   September 18, 2021, 08:10
Default
  #5
Senior Member
 
bigfoot
Join Date: Dec 2011
Location: Netherlands
Posts: 657
Rep Power: 19
bigfootedrockmidget is on a distinguished road
Hi,


I'm not sure what you mean with geometric points and projecting points, but the issue here seems to be not related to su2 but to the way a mesh is defined (in general, bu in this case in the paraview file). A mesh is just a collection of points with connectivity information. These points are not ordered in any way, because 'ordering' is ill defined.



So when you want to visualize data on the surface of some mesh (say: a horizontal line), you might get the points {1,2,3,4,5,6,7} that are on the surface. But they might not be adjacent to each other. points 1 and 2 might be corner points, and 3,4,5,6 might be in between. A line plot will plot the points in the order 1,2,3,4,5,6,7 and then assume that they are connected in that order. The solution is to either plot the result as symbols like points, without connecting lines, or when the surface is a single line (so it has a starting point and an ending point), you can make a plot with 'distance over the curve' on the horizontal axis.
ari003 likes this.

Last edited by bigfootedrockmidget; September 18, 2021 at 14:17.
bigfootedrockmidget is offline   Reply With Quote

Old   September 18, 2021, 08:21
Default
  #6
Senior Member
 
Arijit Saha
Join Date: Feb 2019
Location: Singapore
Posts: 132
Rep Power: 7
ari003 is on a distinguished road
Quote:
Originally Posted by bigfootedrockmidget View Post
Hi,


I'm not sure what you mean with geometric points and projecting points, but the issue here seems to be not related to su2 but to the way a mesh is defined (in general, bu in this case in the paraview file). A mesh is just a collection of points with connectivity information. These points are not ordered in any way, because 'ordering' is ill defined.



So when you want to visualize data on the surface of some mesh (say: a horizontal line), you might get the points {1,2,3,5,5,6,7} that are on the surface. But they might not be adjacent to each other. points 1 and 2 might be corner points, and 3,4,5,6 might be in between. A line plot will plot the points in the order 1,2,3,4,5,6,7 and then assume that they are connected in that order. The solution is to either plot the result as symbols like points, without connecting lines, or when the surface is a single line (so it has a starting point and an ending point), you can make a plot with 'distance over the curve' on the horizontal axis.
Thank you Sir, makes a lot of sense to me. The issue is sorted with your generous suggestion.
Have a nice day.
ari003 is offline   Reply With Quote

Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
[swak4Foam] outputTime in Swak function immortality OpenFOAM Community Contributions 20 October 6, 2022 13:08
How to use "translation" in solidBodyMotionFunction in OpenFOAM rupesh_w OpenFOAM Running, Solving & CFD 5 August 16, 2016 05:27
[snappyHexMesh] sHM layer process keeps getting killed MBttR OpenFOAM Meshing & Mesh Conversion 4 August 15, 2016 04:21
problem with surface creation in ICEM from multiple curves dialolema ANSYS Meshing & Geometry 2 October 27, 2014 14:14
OpenFOAM static build on Cray XT5 asaijo OpenFOAM Installation 9 April 6, 2011 13:21


All times are GMT -4. The time now is 17:42.