AdaptiveCFL#

class AdaptiveCFL[source]#

Bases: Flow360BaseModel

AdaptiveCFL class for Adaptive CFL setting of time stepping.

Example

  • Set up Adaptive CFL with convergence limiting factor:

    >>> fl.AdaptiveCFL(convergence_limiting_factor=0.5)
    
  • Set up Adaptive CFL with max relative change:

    >>> fl.AdaptiveCFL(
    ...     min=1,
    ...     max=100000,
    ...     max_relative_change=50
    ... )
    

Attributes

min: float#

The minimum allowable value for Adaptive CFL. Default value is 0.1 for both steady and unsteady simulations.

Default:

0.1

max: float, optional#

The maximum allowable value for Adaptive CFL. In steady simulations default value is 1e4. In unsteady simulations default value is 1e6.

Default:

None

max_relative_change: float, optional#

The maximum allowable relative change of CFL (%) at each pseudo step. In unsteady simulations, the value of AdaptiveCFL.max_relative_change is updated automatically depending on how well the solver converges in each physical step. In steady simulations default value is 1. In unsteady simulations default value is 50.

Default:

None

convergence_limiting_factor: float, optional#

This factor specifies the level of conservativeness when using Adaptive CFL. Smaller values correspond to a more conservative limitation on the value of CFL. In steady simulations default value is 0.25. In unsteady simulations default value is 1.

Default:

None

Additional Constructors

classmethod from_file(filename)#

Loads a Flow360BaseModel from .json, or .yaml file.

Parameters:

filename (str) – Full path to the .yaml or .json file to load the Flow360BaseModel from.

Returns:

An instance of the component class calling load.

Return type:

Flow360BaseModel

Example

>>> params = Flow360BaseModel.from_file(filename='folder/sim.json') 

Methods

classmethod default_unsteady()[source]#

returns default unsteady Adaptive CFL settings

classmethod default_steady()[source]#

returns default steady Adaptive CFL settings

help(methods=False)#

Prints message describing the fields and methods of a Flow360BaseModel.

Parameters:

methods (bool = False) – Whether to also print out information about object’s methods.

Return type:

None

Example

>>> params.help(methods=True) 
to_file(filename, **kwargs)#

Exports Flow360BaseModel instance to .json or .yaml file

Parameters:

filename (str) – Full path to the .json or .yaml or file to save the Flow360BaseModel to.

Return type:

None

Example

>>> params.to_file(filename='folder/flow360.json')