Skip to content

[SCFD-3184] Removed Optional for entities that should not be None #518

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions flow360/component/simulation/models/volume_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ class ActuatorDisk(Flow360BaseModel):
Note that `center`, `axis_thrust`, `thickness` can be acquired from `entity` so they are not required anymore.
"""

entities: Optional[EntityList[Cylinder]] = pd.Field(None, alias="volumes")
entities: EntityList[Cylinder] = pd.Field(alias="volumes")
force_per_area: ForcePerArea = pd.Field()
name: Optional[str] = pd.Field(None)
type: Literal["ActuatorDisk"] = pd.Field("ActuatorDisk", frozen=True)
Expand Down Expand Up @@ -236,7 +236,7 @@ class BETDisk(Flow360BaseModel):

name: Optional[str] = pd.Field(None)
type: Literal["BETDisk"] = pd.Field("BETDisk", frozen=True)
entities: Optional[EntityList[Cylinder]] = pd.Field(None, alias="volumes")
entities: EntityList[Cylinder] = pd.Field(alias="volumes")

rotation_direction_rule: Literal["leftHand", "rightHand"] = pd.Field("rightHand")
number_of_blades: pd.StrictInt = pd.Field(gt=0, le=10)
Expand Down Expand Up @@ -332,7 +332,7 @@ class PorousMedium(Flow360BaseModel):

name: Optional[str] = pd.Field(None)
type: Literal["PorousMedium"] = pd.Field("PorousMedium", frozen=True)
entities: Optional[EntityList[GenericVolume, Box]] = pd.Field(None, alias="volumes")
entities: EntityList[GenericVolume, Box] = pd.Field(alias="volumes")

darcy_coefficient: InverseAreaType.Point = pd.Field()
forchheimer_coefficient: InverseLengthType.Point = pd.Field()
Expand Down
2 changes: 1 addition & 1 deletion flow360/component/simulation/outputs/outputs.py
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ class SurfaceProbeOutput(Flow360BaseModel):
"""

name: str = pd.Field()
entities: EntityList[Point, PointArray] = pd.Field(None, alias="probe_points")
entities: EntityList[Point, PointArray] = pd.Field(alias="probe_points")
# Maybe add preprocess for this and by default add all Surfaces?
target_surfaces: EntityList[Surface] = pd.Field()

Expand Down
Loading