# Simcenter STAR-CCM+ How to use data from an arbitrary plane in your field function

2022-08-03T16:32:06.000-0400
Simcenter STAR-CCM+ Simcenter STAR-CCM+ Virtual Reality Teamcenter Share Simcenter STAR-CCM+ Viewer Simcenter STAR-CCM+ Application Specific Solutions

## Summary

In this article we will be learning to get a scalar value from an arbitrary plane that is the offset of a boundary in a field function to be used for calculations or to set up a boundary condition.

## Details

Remember that if we are going to directly set a scalar from a surface or volume to another, or we have the option to remesh and create a specific boundary for this purpose, a data mapper will be a simple and efficient way to do this operation, this article describes a method to use an arbitrary plane when no surface is available to extract a scalar as a variable for more complex calculations.

1- Create a new derived part by right clicking on the Derived Parts node and selecting: New Part>Section>Plane...
Be careful to position this plane normal to the boundary where you will be evaluating the field function, check that the origin is in the place where you want to extract the values and remember to select the region to extract the values on the "Parts" option.

2- Create a new table that extracts these values:
Expand the Tools node and right click on the Tables node and select: New Table>XYZ Internal Table
In the newly created table select the field function to be extracted.
And in parts select the plane created in step 1
Rename this table if desired to anything for your reference.
Don't forget to enable the auto extract function with a trigger every iteration or timestep (depending on what works for you)

3- Create the Field Function of the extracted scalar
Now we should create a Field Function that extracts the values of the table to use them in the calculations.
Create a new Scalar Field Function and set the definition as:
interpolatePositionTable(@Table("<tablename>"), "<ColumnToBeExtracted>")
Remember to change the <tablename> name to the name you used for your extracted table and the <ColumnToBeExtracted> to the scalar value in the table.

This function will "interpolate" the values of the derived part to any boundary in the direction of the offset, but it will not modify them as it will only set the closest exact value, which in this case is the exact face down of each cell.

In this example the Field Function name is "_ExtractedTemperature" The table name is "_ExtractedT" and the Scalar to extract is "Temperature"

4- Use this new Scalar Field Function as any other, you can now make calculations as if it was the value directly on this boundary.

If you are using this value to calculate a boundary condition, prior to initializing the table will not be extracted so you will be using a non existent value and StarCCM+ will print an error like that says "Unable to compute field function _VariableMassInlet on  "Fill Holes.HeatSink.InletEnd". Please check that function is defined here."

If this happens just remember to initialize the solution, extract the table and now you should be able to run the simulation.

SummaryDetails

### Associated Components

Design Manager Electronics Cooling In-Cylinder (STAR-ICE) Job Manager Simcenter STAR-CCM+