Version 84 (modified by 12 years ago) ( diff ) | ,
---|
VisIt
Navigate to the directory containing the chombo*.hdf files you wish to visualize and execute visit (from the command line, visit
). From the "Selected files" window in the main GUI, click on a/the listed chombo database and select 'open'.
High resolution datasets can sometimes be arduous to plot. If your dataset is composed of different levels of AMR, you can choose to have visit only plot lower levels of the grid. This can significantly improve computation speed. To do this, go to Controls>Subset
. In the first text box, click on levels
. You can now un-check levels >0 in the middle text box to turn off higher levels of AMR.
Scripts
Visit supports the use of scripts. To execute a script in Visit, go to Controls>Command
at the top of the main window. Add the desired script to one of the numbered tabs and execute by clicking on Execute
at the bottom left of the Commands
window. To save your scripts for later use in Visit, go to Options>Save Settings
at the top of the main window.
Below are some helpful scripts to get started. Note that all of them can be modified to suit your preferences.
Opening Chombo Databases
Opening Chombo-format databases can sometimes be confusing when done through the GUI. Instead, one may run the following script to do most of the job.
This script assumes that the files are ch*.hdf
files, and that Visit has been invoked with Chombo as the default file format (e.g., visit -default_format Chombo
).
(Please NOTE that as is, this script needs some adjustments in order to run smoothly).
# Check to see if a database has already been opened with the script. If one has been, close it. ns = GetDatabaseNStates() if ns > 0: DeleteAllPlots() CloseDatabase(db) # Define paths to the data (NOTE: This could probably be done better using dictionaries) basedir="/home/yirak/" mydbs=("rtwork/multimode/newstuff/higherres3" \ ,"rtwork/multimode/newstuff/lowerres3" \ ,"clumpyjet/production11" \ ,"") # Concatenate relative paths with basedir mydbs=[basedir + i for i in mydbs] # Define the database to be opened ("clumpyjet/production11" in this case) db=mydbs[2]+"/out/ch*.hdf database" OpenDatabase(db)
Create Plot With Pre-Set Preferences
This script allows you to have pre-set preferences applied to your databases. Using this script after it has been saved to your Visit settings (see top of script section), is an efficient way of re-applying preferred plot attributes to new data.
# Create a plot and set some preferences... AddPlot("Pseudocolor","rho") # Change the frame to the last frame SetTimeSliderState(TimeSliderGetNStates()-1) # Set a black background/white foreground aa = AnnotationAttributes() aa.backgroundColor = (0, 0, 0, 255) aa.foregroundColor = (255, 255, 255) #These colors are customizable. To see the #values of other base colors, go to #Controls>Annotation>Colors and click on #the box which displays a color (either #background or foreground color, it doesn't #matter) to select the 'More colors...' #option. Choose a color, and its Red, Green, #and Blue number values will be displayed in #their given text fields. These numbers you #can then copy to the array above, where the #values are - (Red, Green, Blue). SetAnnotationAttributes(aa) DrawPlots()
Command Line Selection of AMR Levels
As discussed at the top of this page, de-selecting higher levels of AMR can greatly increase the speed at which visit generates plots. Here is a script that switches AMR levels off.
# Assume that the choice is supposed to be for all current plots np = GetNumPlots() SetActivePlots(tuple(range(np))) # Get information about levels silr = SILRestriction() silr.SuspendCorrectnessChecking() # Turn off all levels, in anticipation of turning on only those we want silr.TurnOffAll() lvls = silr.SetsInCategory('levels') # Turn on some level(s) # 'lvls' has AMR level 0, 1, 2, ... # stored in lvl[0, 1, 2, ..., -2, -1]. # For example, turn on only the highest level silr.TurnOnSet(lvls[-1]) silr.EnableCorrectnessChecking() SetPlotSILRestriction(silr) # Redraw DrawPlots()
Average quantities over concentric spherical shells
ActivateDatabase("localhost:/media/grassdata/erica/from_bluehive/FinalRunsNewest/BP/chombo00046.hdf") filename = "average_vrad_00046.curve" DeleteActivePlots() AddPlot("Pseudocolor", "vrad", 1, 1) SetActivePlots(0) # inner_sphere(): AddOperator("Clip", 1) ClipAtts = ClipAttributes() ClipAtts.quality = ClipAtts.Fast # Fast, Accurate ClipAtts.funcType = ClipAtts.Sphere # Plane, Sphere ClipAtts.plane1Status = 1 ClipAtts.plane2Status = 0 ClipAtts.plane3Status = 0 ClipAtts.plane1Origin = (0, 0, 0) ClipAtts.plane2Origin = (0, 0, 0) ClipAtts.plane3Origin = (0, 0, 0) ClipAtts.plane1Normal = (1, 0, 0) ClipAtts.plane2Normal = (0, 1, 0) ClipAtts.plane3Normal = (0, 0, 1) ClipAtts.planeInverse = 0 ClipAtts.planeToolControlledClipPlane = ClipAtts.Plane1 # None, Plane1, Plane2, Plane3 ClipAtts.center = (0, 0, 0) ClipAtts.radius = 0.06 ClipAtts.sphereInverse = 1 SetOperatorOptions(ClipAtts, 1) DrawPlots() f = open(filename, "w") f.write("# average_vrad\n") #Query, write average: Query("Average Value") t2 = GetQueryOutputValue() str = "%25.15e %25.15e\n" %(ClipAtts.radius, t2) f.write(str) RemoveAllOperators(1) for i in range(48): dx=0.03 #set to be size of smallest cell? #inner sphere: AddOperator("Clip", 1) ClipAtts = ClipAttributes() ClipAtts.quality = ClipAtts.Fast # Fast, Accurate ClipAtts.funcType = ClipAtts.Sphere # Plane, Sphere ClipAtts.plane1Status = 1 ClipAtts.plane2Status = 0 ClipAtts.plane3Status = 0 ClipAtts.plane1Origin = (0, 0, 0) ClipAtts.plane2Origin = (0, 0, 0) ClipAtts.plane3Origin = (0, 0, 0) ClipAtts.plane1Normal = (1, 0, 0) ClipAtts.plane2Normal = (0, 1, 0) ClipAtts.plane3Normal = (0, 0, 1) ClipAtts.planeInverse = 0 ClipAtts.planeToolControlledClipPlane = ClipAtts.Plane1 # None, Plane1, Plane2, Plane3 ClipAtts.center = (0, 0, 0) ClipAtts.radius = 0.06 + i*dx ClipAtts.sphereInverse = 0 SetOperatorOptions(ClipAtts, 1) #Outer-sphere: AddOperator("Clip", 1) ClipAtts = ClipAttributes() ClipAtts.quality = ClipAtts.Fast # Fast, Accurate ClipAtts.funcType = ClipAtts.Sphere # Plane, Sphere ClipAtts.plane1Status = 1 ClipAtts.plane2Status = 0 ClipAtts.plane3Status = 0 ClipAtts.plane1Origin = (0, 0, 0) ClipAtts.plane2Origin = (0, 0, 0) ClipAtts.plane3Origin = (0, 0, 0) ClipAtts.plane1Normal = (1, 0, 0) ClipAtts.plane2Normal = (0, 1, 0) ClipAtts.plane3Normal = (0, 0, 1) ClipAtts.planeInverse = 0 ClipAtts.planeToolControlledClipPlane = ClipAtts.Plane1 # None, Plane1, Plane2, Plane3 ClipAtts.center = (0, 0, 0) ClipAtts.radius = 0.06 + (i+1)*dx ClipAtts.sphereInverse = 1 SetOperatorOptions(ClipAtts, 1) DrawPlots() Query("Average Value") t2 = GetQueryOutputValue() str = "%25.15e %25.15e\n" %(ClipAtts.radius, t2) f.write(str) RemoveAllOperators(1) f.close() DeleteAllPlots() OpenDatabase(filename) AddPlot("Curve", "average_vrad") DrawPlots()
Create Tiled Image Sequence of Windows Supporting 3D Plot Rotation
#in case you need to restart at a given frame starting_frame=0 #directory for movie output my_dir = "/home/jcarroll/astrocub/driven_turb_256/out/Oct11070904" #base name for movie movie_name = "Dec64" #number of rotations around z-axis rotations=1 #inclination above xy plane in degrees inclination=30 #initial angle of rotation about z-axis measured from x-axis phi0=0 #windows to rotate [1,2,3,...] windows2rotate = [1] # ~~~~~~~~~~~~~~~~~ Output file attributes... OldSaveWindowAtts = SaveWindowAttributes() SaveWindowAtts = SaveWindowAttributes() SaveWindowAtts.outputToCurrentDirectory = 0 SaveWindowAtts.outputDirectory = my_dir SaveWindowAtts.fileName = movie_name SaveWindowAtts.family = 0 SaveWindowAtts.format = SaveWindowAtts.JPEG #BMP, CURVE, JPEG, OBJ, PNG, POSTSCRIPT, PPM, RGB, STL, TIFF, ULTRA, VTK SaveWindowAtts.maintainAspect = 1 SaveWindowAtts.width = 1024 SaveWindowAtts.height = 1024 SaveWindowAtts.screenCapture = 1 #Need screenCapture = 1 for volume plots to save correctly SaveWindowAtts.saveTiled = 1 SaveWindowAtts.quality = 80 SaveWindowAtts.progressive = 0 SaveWindowAtts.binary = 0 SaveWindowAtts.stereo = 0 SaveWindowAtts.compression = SaveWindowAtts.PackBits # None, PackBits, Jpeg, Deflate GlobalAtts = GetGlobalAttributes() frames=TimeSliderGetNStates() from math import * inclination=inclination*acos(-1)/180 dtheta=2*acos(-1.0)*rotations/frames phi0=phi0*acos(-1.0)/180 for state in range(starting_frame, frames): phi=phi0+state*dtheta for wins in GlobalAtts.windows: SetActiveWindow(wins) SetTimeSliderState(state) if wins in windows2rotate: c0=GetView3D() c0.viewNormal=(cos(inclination)*cos(phi), cos(inclination)*sin(phi),sin(inclination)) c0.viewUp=(-sin(inclination)*cos(phi), -sin(inclination)*sin(phi), cos(inclination)) SetView3D(c0) SaveWindowAtts.fileName = movie_name + "%(frame)04d" % {'frame':state} SetSaveWindowAttributes(SaveWindowAtts) SaveWindow() SetSaveWindowAttributes(OldSaveWindowAtts)
Same as Above With Time Slider State Query and Time-Scale Variable Printing
Note that in this script, any text object created will show up in the Controls>Annotation Menu under Objects. You can delete them if you need to start over again
#in case you need to restart at a given frame starting_frame=1 #directory for movie output my_dir = "/home/chaig/envelope21_2/" #base name for movie movie_name = "envelope21_2_density_mach" #time scaling, if any: timesc1 = 1.40796638173 # for analytic disk 3 AU rotational time timesc5 = 0.497791288101 # for analytic disk 3 AU free-fall time timesc10 = 164660183.697 # Runtimesc for lscale = 1 AU #number of rotations around z-axis #rotations=.5 #inclination above xy plane in degrees #inclination=30 #initial angle of rotation about z-axis measured from x-axis #phi0=0 #windows to rotate #windows2rotate = [1] #~~~~~~~~~~~~~~~~~ Output Annotation Attributes AnnotationAtts = GetAnnotationAttributes() # ~~~~~~~~~~~~~~~~~ Output file attributes... OldSaveWindowAtts = SaveWindowAttributes() SaveWindowAtts = SaveWindowAttributes() SaveWindowAtts.outputToCurrentDirectory = 0 SaveWindowAtts.outputDirectory = my_dir SaveWindowAtts.fileName = movie_name SaveWindowAtts.family = 0 SaveWindowAtts.format = SaveWindowAtts.PNG #BMP, CURVE, JPEG, OBJ, PNG, POSTSCRIPT, PPM, RGB, STL, TIFF, ULTRA, VTK #SaveWindowAtts.maintainAspect = 1 SaveWindowAtts.width = 1024 SaveWindowAtts.height = 1024 SaveWindowAtts.screenCapture = 1 SaveWindowAtts.saveTiled = 1 SaveWindowAtts.quality = 80 SaveWindowAtts.progressive = 0 SaveWindowAtts.binary = 0 SaveWindowAtts.stereo = 0 SaveWindowAtts.compression = SaveWindowAtts.PackBits # None, PackBits, Jpeg, Deflate GlobalAtts = GetGlobalAttributes() frames=TimeSliderGetNStates() #from math import * #inclination=inclination*acos(-1)/180 #dtheta=2*acos(-1.0)*rotations/frames #phi0=phi0*acos(-1.0)/180 slider = CreateAnnotationObject("Text2D") # This creates a text object slider.width = 0.3 # This sets the width of the object slider.SetPosition(0.6, 0.57) # This sets the position on the screen of the object slider.useForegroundForTextColor = 0 # If you wish the text be simply black, set this to 1 slider.textColor = (0,0,0,255) # RGBT color - T for transparency for state in range(0, frames): # phi=phi0+state*dtheta for wins in GlobalAtts.windows: SetActiveWindow(wins) SetTimeSliderState(state) # if wins in windows2rotate: # c0=GetView3D() # c0.viewNormal=(cos(inclination)*cos(phi), cos(inclination)*sin(phi),sin(inclination)) # c0.viewUp=(-sin(inclination)*cos(phi), -sin(inclination)*sin(phi), cos(inclination)) # SetView3D(c0) # Query the value of the time slider state Query("Time") v = GetQueryOutputValue()/timesc1 f = GetQueryOutputValue()/timesc5 j = GetQueryOutputValue()*timesc10 k = GetQueryOutputValue()*timesc10/(31556736) # Add what you wish to your string - %g indicates that a variable is coming to the right of the " string = "Orbits at 3 AU = %g" %v string = string + "\n Free Fall Times from 3 AU = %g" %f string = string + "\n Time (seconds) = %g" %j string = string + "\n Time (years) = %g" %k string = string + "\n density scale = 1e8 cm-3" string = string + "\n Run Time Scaling = %g" %k # Set the string to be the slider text slider.text = string SaveWindowAtts.fileName = movie_name + "%(frame)04d" % {'frame':state} SetSaveWindowAttributes(SaveWindowAtts) SaveWindow() SetSaveWindowAttributes(OldSaveWindowAtts)
Script for following collapse of uniform sphere
This script adjusts the window bounds to zoom in on a region at the same rate the region collapses (assuming it follows the solution for a uniform density sphere undergoing free fall collapse)
r_0=60 # Initial radius of view (usually 150% of clump radius is good) r_min=8 # Radius to stop shrinking at (32*levels(MaxLevel)%dx) singular_time=.66 #t_ff using clump density in computational units (or by eye) center=(240,240) #Clump location in computational units starting_frame=0 #Frame to start from final_frame=63 #Frame to stop at my_dir = "/grassdata/johannjc/scrambler_111007/modules/Problem/Images/2D" #directory for movie output movie_name = "ZoomingRhoTestwSinksA" #base name for movie # ~~~~~~~~~~~~~~~~~ Output file attributes... ~~~~~~~~~~~~~~~~~~~~~~~~~ OldSaveWindowAtts = SaveWindowAttributes() SaveWindowAtts = SaveWindowAttributes() SaveWindowAtts.outputToCurrentDirectory = 0 SaveWindowAtts.outputDirectory = my_dir SaveWindowAtts.fileName = movie_name SaveWindowAtts.family = 0 SaveWindowAtts.format = SaveWindowAtts.PNG #BMP, CURVE, JPEG, OBJ, PNG, POSTSCRIPT, PPM, RGB, STL, TIFF, ULTRA, VTK SaveWindowAtts.width = 1024 SaveWindowAtts.height = 1024 SaveWindowAtts.screenCapture = 1 SaveWindowAtts.saveTiled = 1 SaveWindowAtts.quality = 80 SaveWindowAtts.progressive = 0 SaveWindowAtts.binary = 0 SaveWindowAtts.stereo = 0 SaveWindowAtts.compression = SaveWindowAtts.PackBits GlobalAtts = GetGlobalAttributes() a=GetView2D() from math import * for state in range(starting_frame, final_frame): Query('Time') #Get current database time tratio=min(GetQueryOutputValue()/singular_time*1.0,1.0) # Calculate t/t_ff rratio=.7178*sqrt(1-tratio**2)+.3068*(1-tratio**2)-.01842 # Approximate fit to free fall radius ratio r=max(r_min,r_0*rratio) # Scale current radius based on rratio keeping it > r_min a.windowCoords=(center[0]-r, center[0]+r, center[1]-r, center[1]+r) # Set window coords to encompass clump circle for wins in GlobalAtts.windows: #In case there are multiple windows SetActiveWindow(wins) SetTimeSliderState(state) SetView2D(a) SaveWindowAtts.fileName = movie_name + "%(frame)04d" % {'frame':state} SetSaveWindowAttributes(SaveWindowAtts) SaveWindow() ClearCache("localhost") SetSaveWindowAttributes(OldSaveWindowAtts)
More complicated movie tracking a particle
I first had to use some linux-fu to get the particle's xy location that I wanted to track into xloc.dat. I then used d=f.readline
to read each line and c=d.split
to parse the line. I then used c[3]
and c[5]
as the x and y position of the particle which I then used to set the window coords etc… Here is an AVI version of the movie
movie_name="sinkzoom" framestart_mesh=130 framestart_zoom=160 frameend_zoom=190 frameadd_v=220 frameend=300 zoom_factor=12 zf=zoom_factor**(1.0/(frameend_zoom-framestart_zoom)) print zf f=open('xloc.dat') SaveWindowAtts = SaveWindowAttributes() SaveWindowAtts.fileName = movie_name SaveWindowAtts.family = 0 for i in range(0,framestart_mesh): f.readline() SetTimeSliderState(i) SaveWindowAtts.fileName = movie_name + "%(frame)04d" % {'frame':i} SetSaveWindowAttributes(SaveWindowAtts) SaveWindow() ClearCache("localhost") a=GetView2D() b=GetView2D() AddPlot("Mesh","Mesh") DrawPlots() for i in range(framestart_mesh, framestart_zoom): f.readline() SetTimeSliderState(i) SaveWindowAtts.fileName = movie_name + "%(frame)04d" % {'frame':i} SetSaveWindowAttributes(SaveWindowAtts) SaveWindow() ClearCache("localhost") for i in range(framestart_zoom, frameend_zoom): d=f.readline() c=d.split() x=float(c[3]) y=float(c[5]) print x,y viewsizex=(b.windowCoords[1]-b.windowCoords[0])/(zf**(i-framestart_zoom+1)) viewsizey=(b.windowCoords[3]-b.windowCoords[2])/(zf**(i-framestart_zoom+1)) xlower = max(b.windowCoords[0], x-viewsizex/2) ylower = max(b.windowCoords[2], y-viewsizey/2) xupper = min(b.windowCoords[1], xlower+viewsizex) yupper=min(b.windowCoords[3], ylower+viewsizey) xlower=xupper-viewsizex ylower=yupper-viewsizey a.windowCoords=(xlower,xupper,ylower,yupper) SetView2D(a) SetTimeSliderState(i) SaveWindowAtts.fileName = movie_name + "%(frame)04d" % {'frame':i} SetSaveWindowAttributes(SaveWindowAtts) SaveWindow() ClearCache("localhost") SetActivePlots(2) HideActivePlots() for i in range (frameend_zoom,frameadd_v): d=f.readline() c=d.split() x=float(c[3]) y=float(c[5]) print x,y viewsizex=(b.windowCoords[1]-b.windowCoords[0])/zoom_factor viewsizey=(b.windowCoords[3]-b.windowCoords[2])/zoom_factor xlower = max(b.windowCoords[0], x-viewsizex/2) ylower = max(b.windowCoords[2], y-viewsizey/2) xupper = min(b.windowCoords[1], xlower+viewsizex) yupper=min(b.windowCoords[3], ylower+viewsizey) xlower=xupper-viewsizex ylower=yupper-viewsizey a.windowCoords=(xlower,xupper,ylower,yupper) SetView2D(a) SetTimeSliderState(i) SaveWindowAtts.fileName = movie_name + "%(frame)04d" % {'frame':i} SetSaveWindowAttributes(SaveWindowAtts) SaveWindow() ClearCache("localhost") AddPlot("Vector","v") DrawPlots() for i in range (frameadd_v,frameend): d=f.readline() c=d.split() x=float(c[3]) y=float(c[5]) print x,y viewsizex=(b.windowCoords[1]-b.windowCoords[0])/zoom_factor viewsizey=(b.windowCoords[3]-b.windowCoords[2])/zoom_factor xlower = max(b.windowCoords[0], x-viewsizex/2) ylower = max(b.windowCoords[2], y-viewsizey/2) xupper = min(b.windowCoords[1], xlower+viewsizex) yupper=min(b.windowCoords[3], ylower+viewsizey) xlower=xupper-viewsizex ylower=yupper-viewsizey a.windowCoords=(xlower,xupper,ylower,yupper) SetView2D(a) SetTimeSliderState(i) SaveWindowAtts.fileName = movie_name + "%(frame)04d" % {'frame':i} SetSaveWindowAttributes(SaveWindowAtts) SaveWindow() ClearCache("localhost") f.close()
Derived Expressions
Using Controls>Expressions, Visit users can create derived expressions based on the components in the Chombo (or BOV) files and the mesh. Refer to What data file formats can VisIt read? for a description of these file formats.
Users can visualize their expressions by choosing the desired plot type from Plots
and then selecting the desired expression; i.e., Plots>Pseudocolor>Expression_Name.
Chombo Expressions
Some standard expressions for chombo files are given below. Note that a forward slash will create a subdirectory of variables.
Expressions can be specified in terms of scalar variables or vector variables. Make sure when defining an expression that uses vectors, 'Vector Mesh Variable' is set on the "type"
drop-down menu in the Expressions
window. Vector expressions are identified as such in the table below.
(Note that these expressions are displayed with sub- and superscripts. You should be aware of this if you attempt to copy and paste them straight into VisIt, which accepts only plain text.)
Chombo Expressions | |||
---|---|---|---|
Name | Definition | Expression | Notes |
vx | px/rho | velocity in x | |
vy | py/rho | velocity in y | |
vz | pz/rho | velocity in z | |
2d/vmag | sqrt(vx^2+vy^2) | magnitude of velocity in 2-d | |
3d/vmag | sqrt(vx^2+vy^2+vz^2) | magnitude of velocity in 3-d | |
gamma | 5/3 | ||
hydro/2dpressure | (gamma-1)*(E-0.5*(px^2+py^2)/rho) | Hydro pressure, 2d | |
hydro/3dpressure | (gamma-1)*(E-0.5*(px^2+py^2+pz^2)/rho) | Hydro pressure, 3d | |
hydro/Temp | <hydro/pressure>/rho | temperature for hydro | note use of another derived expression |
hydro/TempPhysical | tempScale*<hydro/pressure>/rho | Gives T in physical units | tempScale should be defined in physics.data |
MHD/pressure | (gamma-1)*(E-0.5*(px^2+py^2+pz^2)/rho-0.5*(Bx^2+By^2+Bz^2)) | MHD pressure | Includes magnetic terms! |
MHD/Bmag | sqrt(Bx^2+By^2[+ Bz^2]) | MHD Plasma Beta | Bracketed term is optional, depending on if you are in 2d or 3d |
MHD/invbeta | <MHD/Bmag>^2/<MHD/pressure> | MHD Inverse Plasma Beta | |
MHD/Temp | <MHD/pressure>/rho | temperature for MHD | |
MHD/TempPhysical | tempScale*<MHD/pressure>/rho | ||
2d/soundSpeed | sqrt((5/3) * <hydro/pressure> * rho^-1) | sound speed, 2D | assumes gamma = 5/3, if using MHD this expression should use MHD pressure |
3d/soundSpeed | sqrt((5/3) * <hydro/pressure> * rho^-1) | sound speed, 3D | assumes gamma = 5/3, and above comment applies here as well |
2d/Mach | <2d/vmag> / <2d/soundSpeed> | Mach number | |
3d/Mach | <3d/vmag> / <3d/soundSpeed> | Mach number, 3D | |
Bvec | {Bx,By} | Magnetic field lines | ! vector mesh quantity |
2d/divB | divergence(Bvec) | divergence of magnetic field, 2D | |
Vvec | {vx,vy} | velocity vector field | ! vector mesh quantity |
2d/divV | divergence(Vvec) | divergence of vector field, 2D | |
2d/vort | curl(Vvec) | vorticity, 2D | ! As this is a plot of a 2d expression, it must be chosen as a scaler variable |
2d/gradVel | magnitude(gradient(<2d/vmag>)) | magnitude of gradient of velocity | |
schlieren | magnitude(gradient(log10(rho))) | synthetic Schlieren image | |
3d/entropy | log10(<hydro/3dpressure>)-(gamma)*log10(rho) | entropy, 3D | |
misc/position_vec | coord(Mesh) | position vector | ! vector mesh variable |
misc/position_mag | magnitude(coord(Mesh)) | scalar position | |
misc/position_proj | magnitude({cos(deg2rad(30.))*position_vec![0], sin(deg2rad(30.))*position_vec![1]}) | position projected at 30 degrees | note first component of pos_vec is at 0 |
misc/proj_vx | cos(deg2rad(30.))*px*rho^-1 | vx projected at 30 degrees | |
hydro-static equilibrium | magnitude(gradient(pressure)/rho) + magnitude(gradient (Phi)) | Scaler force equation. |
BOV expressions
The variables in the BOV files from AstroCub are in different order than in AstroBear. Here are some equivalent expressions:
BOV Expressions | |||
---|---|---|---|
Name | Definition | Expression | Notes |
comp/vx | comp02*comp00^-1 | x-velocity | |
comp/vy | comp03*comp00^-1 | y-velocity | |
comp/2dpressure | (5/3-1)*(comp01-0.5*(comp02+comp03 )*comp00) | pressure, 2D | assumes gamma = 5/3 |
comp/2dTemp | <comp/p>*comp00^-1 | temperature, 2D |
Attachments (1)
- sinkzoom2.AVI (21.2 MB ) - added by 13 years ago.