FhSim  3.1.0
Marine systems simulation
Loading...
Searching...
No Matches

Draws a quantity of the flow, the waves or the wakes, or a scalar field, on a plane.

+ Collaboration diagram for Field plane:

Visualization SimObject showing a field of the environment on a flat plane.

The quantity is sampled onto a regular grid covering the plane and uploaded as a texture the GPU reads per fragment, so the colour ramp is applied per fragment. It is sampled again only when Refresh says so: with the default Auto, once for a time-invariant scalar field, when the wakes change for a quantity of the wakes and jets alone (Deficit, or a velocity of Terms Wake and/or Jet), and every frame otherwise (the current, the waves). Sampling runs on every core while the simulation waits.

The plane may be tilted freely through LocalX and LocalY; only their directions are used: LocalX is normalised and LocalY is re-orthogonalised against it, so Size alone sets the extent. It may also move: back and forth between Position and Position2, and spinning about its own axes; a moving plane is sampled again every frame over the region it covers.

Scrubbing back through the history shows the fields as they are now, not as they were.

Example Configuration (XML)

<Lib LibName="fhsim_environment" SimObject="VisualFieldPlane" Name="WakeSlice">
<Parameter name="Quantity">Deficit</Parameter>
<Parameter name="Position">50, 0, 10</Parameter>
<Parameter name="Size">150, 60</Parameter>
<Parameter name="Resolution">300, 120</Parameter>
<Parameter name="ColorRange">0, 0.3</Parameter>
<Parameter name="VisibleRange">0.005, 1</Parameter>
</Lib>

Input ports

None.

Output ports

None.

Configuration Parameters

Name Width Description
Quantity 1 What is shown. Speed: magnitude of the velocity of Terms [m/s]. Component: the velocity of Terms along Axis [m/s]. Deficit: the combined wake deficit in [0, 1] (jets left out). Pressure and TotalPressure: of the waves [Pa]. Elevation: wave surface elevation [m]. Scalar: the scalar field FieldName. Any case. (Default: Scalar with FieldName, Speed without)
Terms 1 The parts of the water velocity Speed and Component sum, any of Current, Waves, Wake and Jet: Current is the ambient current, Wake the change the wakes make to it, d (u_s - u_amb), Jet the propellers' excess velocity, Waves the wave particle velocity. Only with Speed and Component. (Default: Current, Waves, Wake, Jet)
Axis 3 Direction of Component, NED; normalised. Required with Component, an error otherwise.
FieldName 1 Name of the scalar field to show, as registered by the Environment. Required with Quantity Scalar, an error otherwise.
Refresh 1 When the field is sampled again. Auto: as described above. Once: at the start only. OnChange: when the wakes or jets change (a new rebuild, a blend, a moving wake), at most every RefreshPeriod while they change continuously; the wake part also follows the current, which OnChange assumes is steady. Period: every RefreshPeriod. EveryFrame: every rendered frame. (Default: Auto)
RefreshPeriod 1 Simulation time between samples of Refresh Period [s], and the least time between samples of a continuously changing OnChange field (0: every frame). (Default: 0)
Position 3 Plane centre in the NED frame [x, y, z] [m]. (Default: 0, 0, 0)
LocalX 3 Plane local X axis. Normalised on input, so only its direction matters; the zero vector is an error. (Default: 1, 0, 0)
LocalY 3 Plane local Y axis. Normalised and re-orthogonalised against LocalX on input; the zero vector and a direction parallel to LocalX are errors. (Default: 0, 1, 0)
Size 2 Plane dimensions [u, v] [m]. (Default: 50, 50)
Position2 3 Second plane centre: the plane moves back and forth between Position and Position2 over PositionPeriod [m]. (Optional)
PositionPeriod 1 Period of the back-and-forth motion [s]; needed with Position2. (Optional)
RotationPeriodX 1 Period of a spin about the initial LocalX [s]; 0 is no spin. (Default: 0)
RotationPeriodY 1 Period of a spin about the initial LocalY [s]; 0 is no spin. (Default: 0)
Spacing 2 Grid spacing along [u, v], the plane's own axes [m]. Mutually exclusive with Resolution. (Default: absent, a spacing near 512 x 512 cells is derived)
Resolution 2 Samples along [u, v], the plane's own axes. Mutually exclusive with Spacing. (Default: absent, a spacing near 512 x 512 cells is derived)
ColorRange 2 Value span mapped across the full colour ramp [min, max]. (Default: probed from the field when it is sampled once, else 0, 1)
VisibleRange 2 Value span drawn at all [min, max]; values outside it are fully transparent. (Default: probed from the field and widened by one encoding code when it is sampled once, else ColorRange)
AlphaRange 2 Opacity span applied across the visible range [min, max], clamped to [0, 1]. (Default: 0.3, 0.6)
ShowExtrapolated 1 Draw values the field flagged as inaccurate (OUT_OF_RANGE_INACCURATE, such as a depth profile clamped outside its layers) instead of masking them. A value with an error status is masked whatever this says. (Default: false)

This SimObject is referred to as VisualFieldPlane