I installed via pip install openterrace
into my existing conda environment in Windows 10.
In Tutorial 1, I get this error:
ot = openterrace.Setup(t_end=60*10, dt=0.01, sim_name='tutorial1')
AttributeError: module 'openterrace' has no attribute 'Setup'
In the other Tutorials, I get this error:
ot.fluid.select_bc(bc_type='fixedValue',
in select_bc
raise Exception("bc_type \'"+bc_type+"\' specified. Valid options for bc_type are:", valid_bc_types)
Exception: ("bc_type 'fixedValue' specified. Valid options for bc_type are:", ['neumann', 'dirichlet', 'dirichlet_timevarying'])
After changing the BC to neumann or dirichlet, I then get this error:
ot.bed.select_domain_shape(domain='sphere_1d', R=R)
in select_domain_shape
self.domain.shape = self.domain.shape(kwargs)
TypeError: 'numpy.ndarray' object is not callable
Any ideas how to fix this or what is going wrong? Is the installation incomplete?
In my folder \anaconda3\Lib\site-packages\openterrace
I have a folder called boundary_conditions
which does not exist in the repository here on github. In that, there are 3 empty(!) .py files: fixedValue.py
, timeVaryingFixedValue.py
and zeroGradient.py
I can run the \openterrace\tests\test_functions.py
, added this code to its end:
def run_all_tests():
for test_cls in [TestDiffusion, TestConvection]:
test_instance = test_cls()
for method in dir(test_instance):
if method.startswith('test_'):
getattr(test_instance, method)()
if __name__ == '__main__':
run_all_tests()
And the 3 output .svg files seem fine: