Recording the Actions for Step 3
Record the actions for Step 3.
-
Copy the following code into the
initialConditionsAndBoundarySettings() function:
Simulation simulation_0 = getActiveSimulation(); PhysicsContinuum physicsContinuum_0 = ((PhysicsContinuum) simulation_0.getContinuumManager().getContinuum("Physics")); VelocityProfile velocityProfile_0 = physicsContinuum_0.getInitialConditions().get(VelocityProfile.class); velocityProfile_0.getMethod(ConstantVectorProfileMethod.class).getQuantity().setComponents(0.429, 0.0, 0.0); Region region_0 = simulation_0.getRegionManager().getRegion("Fluid"); Boundary boundary_0 = region_0.getBoundaryManager().getBoundary("Inlet"); boundary_0.setBoundaryType(InletBoundary.class); VelocityMagnitudeProfile velocityMagnitudeProfile_0 = boundary_0.getValues().get(VelocityMagnitudeProfile.class); velocityMagnitudeProfile_0.getMethod(ConstantScalarProfileMethod.class).getQuantity().setValue(0.429); Boundary boundary_1 = region_0.getBoundaryManager().getBoundary("Outlet"); boundary_1.setBoundaryType(PressureBoundary.class);
- Reformat the code in NetBeans.
- Select .
- In the Fix All Imports dialog, click OK.