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

How to write output data for a specific cell (ExtractSelection)

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   November 8, 2023, 23:17
Post How to write output data for a specific cell (ExtractSelection)
  #1
New Member
 
Vivek kumar
Join Date: Mar 2021
Location: India
Posts: 8
Rep Power: 5
vivekdixit194 is on a distinguished road
Dear All,
As I am interested to write a particular cell data from the whole domain in SU2 code, because When I am writing the data for a full domain it is taking too much time and memory.
Can anyone please help me to do this ?


Thanks in advance


regards
Vivek Kumar, India

Last edited by vivekdixit194; November 9, 2023 at 07:40.
vivekdixit194 is offline   Reply With Quote

Old   November 9, 2023, 16:00
Default
  #2
Senior Member
 
bigfoot
Join Date: Dec 2011
Location: Netherlands
Posts: 529
Rep Power: 17
bigfootedrockmidget is on a distinguished road
You can add monitoring points, which are called probes in SU2.


The documentation is here:
https://su2code.github.io/docs_v7/Custom-Output/


You could do this to output the velocity in a point P(0.1, 0.2, 0.3):
Code:
CUSTOM_OUTPUTS='velocity : Macro{sqrt(pow(VELOCITY_X, 2) + pow(VELOCITY_Y, 2) + pow(VELOCITY_Z, 2))};\
point1 : Probe{$velocity}[0.1, 0.2, 0.3]'
bigfootedrockmidget is offline   Reply With Quote

Old   November 21, 2023, 02:39
Default Error in writing the Tempertaure for a specific cell (Not for all the cells )
  #3
New Member
 
Vivek kumar
Join Date: Mar 2021
Location: India
Posts: 8
Rep Power: 5
vivekdixit194 is on a distinguished road
Dear,
Thanks a lot for your response.

I was using the same documents given in the SU2 webpage but It is giving error.


I have used

CUSTOM_OUTPUTS= 'velocity : Macro{sqrt(pow(VELOCITY_X, 2) + pow(VELOCITY_Y, 2) + pow(VELOCITY_Z, 2))};\
avg_vel : AreaAvg{$velocity}[z_minus, z_plus];\
var_vel : AreaAvg{pow($velocity - avg_vel, 2)}[z_minus, z_plus];\
dev_vel : Function{sqrt(var_vel) / avg_vel};\
probe1 : Probe{$velocity}[0.005, 0.005, 0.05]'



But the error in the terminal is shown as

Error in "void CFlowOutput::ConvertVariableSymbolsToIndices(const CPrimitiveIndices<long unsigned int>&, bool, COutput::CustomOutput&) const":
-------------------------------------------------------------------------
Invalid history output or solver variable (VELOCITY_Z) used in function avg_vel
Valid solvers variables:
CP_TOTAL
DENSITY
EDDY_VISCOSITY
LAMINAR_VISCOSITY
PRESSURE
SOUND_SPEED
TEMPERATURE
THERMAL_CONDUCTIVITY
VELOCITY_X
VELOCITY_Y
TURB[0,1,...]
RAD[0,1,...]
SPECIES[0,1,...]
SCALAR[0,1,...]

------------------------------ Error Exit -------------------------------



I would like to tell you that I am interested in finding out the temperature for a specific point and dont want to write the temperature for all the domain.



Thanks in advance
vivekdixit194 is offline   Reply With Quote

Old   November 21, 2023, 03:08
Default Not writing the specific cell data
  #4
New Member
 
Vivek kumar
Join Date: Mar 2021
Location: India
Posts: 8
Rep Power: 5
vivekdixit194 is on a distinguished road
If I am removing the Z points from the probe, still not writing the specific cell data. Still writing the whole domain data without any error.
vivekdixit194 is offline   Reply With Quote

Old   November 21, 2023, 07:37
Default
  #5
Senior Member
 
bigfoot
Join Date: Dec 2011
Location: Netherlands
Posts: 529
Rep Power: 17
bigfootedrockmidget is on a distinguished road
Where are you looking?
bigfootedrockmidget is offline   Reply With Quote

Old   November 22, 2023, 01:06
Default Not writing the specific cell data
  #6
New Member
 
Vivek kumar
Join Date: Mar 2021
Location: India
Posts: 8
Rep Power: 5
vivekdixit194 is on a distinguished road
Dear,
I am adding few lines as suggested by you in my config file,


CUSTOM_OUTPUTS= 'velocity : Macro{sqrt(pow(VELOCITY_X, 2) + pow(VELOCITY_Y, 2))};\
avg_vel : AreaAvg{$velocity}[z_minus, z_plus];\
var_vel : AreaAvg{pow($velocity - avg_vel, 2)}[z_minus, z_plus];\
dev_vel : Function{sqrt(var_vel) / avg_vel};\
probe1 : Probe{$velocity}[0.1032, 0.8036]'

SCREEN_OUTPUT= INNER_ITER, RMS_DENSITY, RMS_ENERGY, LINSOL_RESIDUAL, FORCE_Z,\
SURFACE_MASSFLOW, SURFACE_TOTAL_TEMPERATURE, avg_vel, dev_vel, probe1, COMBO
HISTORY_OUTPUT = ITER, AERO_COEFF, FLOW_COEFF, FLOW_COEFF_SURF, CUSTOM, COMBO
OBJECTIVE_FUNCTION= CUSTOM_OBJFUNC
CUSTOM_OBJFUNC= 'SURFACE_TOTAL_TEMPERATURE'



But After running my code, Still It is writing Whole volume file as I am not interested in writing the values for all the domain.


Please help me to write only cell data because it is taking 4MB file for a single iteration.
vivekdixit194 is offline   Reply With Quote

Old   November 22, 2023, 01:46
Default How to write only probe data
  #7
New Member
 
Vivek kumar
Join Date: Mar 2021
Location: India
Posts: 8
Rep Power: 5
vivekdixit194 is on a distinguished road
Dear,
Can you please help me to write only probe data ?


CUSTOM_OUTPUTS='temperature : Macro{TEMPERATURE};\
probe1 : Probe{$temperature}[0.1032, 0.8036]'
vivekdixit194 is offline   Reply With Quote

Old   November 22, 2023, 02:25
Default
  #8
Senior Member
 
bigfoot
Join Date: Dec 2011
Location: Netherlands
Posts: 529
Rep Power: 17
bigfootedrockmidget is on a distinguished road
I meant in which output file are you looking, it seems that you are looking in the volume output file, but the custom output is written to the history file.
bigfootedrockmidget is offline   Reply With Quote

Old   November 22, 2023, 06:39
Default Custom output is written in history file not in Volume file.
  #9
New Member
 
Bihar
Join Date: May 2023
Posts: 3
Rep Power: 2
vivekdixit is on a distinguished road
Dear,

Got it.
Thank you so much for your help.
vivekdixit is offline   Reply With Quote

Old   November 25, 2023, 06:04
Default Error: The current solver can only use 'Function' custom outputs.
  #10
New Member
 
Vivek kumar
Join Date: Mar 2021
Location: India
Posts: 8
Rep Power: 5
vivekdixit194 is on a distinguished road
Dear,


I am getting Error.


Error in "void COutput::ComputeSimpleCustomOutputs(const CConfig*)":
-------------------------------------------------------------------------
The current solver can only use 'Function' custom outputs.
------------------------------ Error Exit -------------------------------


I am using MULTIPHYSICS solver and trying to write the files in ELASTICITY Solver.
Why i am getting this error ?. Please help me to fix this.



thanks in advance
vivekdixit194 is offline   Reply With Quote

Reply

Tags
su2 7.2.0

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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
Simulation of a single bubble with a VOF-method Suzzn CFX 21 January 29, 2018 00:58
Simple piston movement in cylinder- fluid models arun1994 CFX 4 July 8, 2016 02:54
Compression stoke is giving higher pressure than calculated nickjuana CFX 62 May 19, 2015 13:32
studying a valve case mina.basta OpenFOAM 33 August 30, 2013 04:46
How to update polyPatchbs localPoints liu OpenFOAM Running, Solving & CFD 6 December 30, 2005 17:27


All times are GMT -4. The time now is 19:03.