# Boundary Condition Overrides

Christian Kongsgaard
2021-03-01

There are two ways of overriding the boundary conditions, when using Compute. You can apply an override to the preset that will affect all boundary conditions in the entire simulation, that uses that preset. Or you can override per boundary condition.

# Global Overrides

Solution overrides is an easy way for applying case-wide adjustments to the simulation case you are running.

The override input on the `CFD Solution` component accepts the following keys:

``````{
"fields": [],
"caseFiles": [],
"presets": [],
"setup": []
}
``````

To change a boundary condition preset, we have to input the override into `presets`.

If we were i.e. to change the `U` component of the `wall` preset, we could do it like below:

``````{
"wall": {
"U": "{ type fixedValue; value uniform ( 1 0 0);}"
}
}
``````

# Local Overrides

If you instead were to only override a single boundary condition, you can do it in the `CFD Boundary Condition` component. In all our `CFD` demos we actually override the inlet boundary condition.

In the above picture we override the velocity inlet from an Atmospheric Boundary Layer boundary condition.

# Presets

Below is the presets we use in Compute. They can all be changed with the above-mentioned methods.

``````wall {
U           { type fixedValue; value uniform ( 0 0 0 ); }
k           { type kqRWallFunction; value uniform 0; }
epsilon     { type epsilonWallFunction; value uniform 0; }
omega       { type omegaWallFunction; value uniform 0; }
nut         { type nutkWallFunction; value uniform 0; }
}

wallSlip {
U           { type slip; }
nut         { type nutkWallFunction; value uniform 0; }
}

fixedVelocity    {
U           { type fixedValue; value uniform ( 0 0 0 ); }
k           { type fixedValue; value uniform 0; }
epsilon     { type fixedValue; value \$internalField; }
omega       { type fixedValue; value uniform 0; }
nut         { type fixedValue; value uniform 0; }
}

fixedPressure    {
p           { type fixedValue; value uniform 0; }
}

fixedPressureOutOnly    {
U           { type inletOutlet; value uniform ( 0 0 0 ); inletValue uniform ( 0 0 0 ); }
p           { type fixedValue; value uniform 0; }
}

atmBoundaryLayer {
U   {
type atmBoundaryLayerInletVelocity;
Uref                 10.0;
Zref                 20;
zDir                 (0 0 1);
flowDir              (1 0 0);
z0                   uniform 0.1;
zGround              uniform 0;
value                uniform ( 0 0 0 );
}
epsilon {
type atmBoundaryLayerInletEpsilon;
Uref                 10.0;
Zref                 20;
zDir                 (0 0 1);
flowDir              (1 0 0);
z0                   uniform 0.1;
zGround              uniform 0;
value                uniform 0.01;
}
k           { type kqRWallFunction; value uniform 0; }