Skip to content
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

LES model, Wale: question regarding derived_bcs #30

Open
Tom303-afk opened this issue Apr 28, 2020 · 0 comments
Open

LES model, Wale: question regarding derived_bcs #30

Tom303-afk opened this issue Apr 28, 2020 · 0 comments

Comments

@Tom303-afk
Copy link

Tom303-afk commented Apr 28, 2020

Dear all,

In my current project I would like to make use of the Wale model, however I get stuck at the following part of the Wale setup:

ff = MeshFunction("size_t", mesh, mesh.topology().dim() - 1, 0)
bcs_nut = derived_bcs(CG1, bcs['u0'], u_)
nut_ = CG1Function(nut_form, mesh, method=nut_krylov_solver,
                   bcs=bcs_nut, name='nut', bounded=True)
return dict(Sij=Sij, Sd=Sd, Skk=Skk, nut_=nut_, delta=delta, bcs_nut=bcs_nut)

The error I get is as follows:
Traceback (most recent call last):
File "NSfracStep1.py", line 134, in
vars().update(les_setup(**vars()))
File "/home/tom/anaconda3/lib/python3.7/site-packages/oasis-2018.1-py3.7.egg/oasis/solvers/NSfracStep/LES/Wale.py", line 37, in les_setup
bcs_nut = derived_bcs(CG1, bcs['u0'], u_)
File "/home/tom/anaconda3/lib/python3.7/site-packages/oasis-2018.1-py3.7.egg/oasis/solvers/NSfracStep/LES/common.py", line 27, in derived_bcs
subdomain = bc.user_sub_domain()
AttributeError: 'DirichletBC' object has no attribute 'user_sub_domain'

The problem seems to be I have no attribute user_sub_domain in my bcs, in the common.py file in the LES folder this is used as follows:
for i, bc in enumerate(original_bcs):
subdomain = bc.user_sub_domain()
new_bcs.append(DirichletBC(V, Constant(0), subdomain))

My question is:
Can I circumvent this error or solve the issue? I fail to solve it myself as with my lack of experience I do not understand the purpose of the function "derived_bcs".

Kind regards

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant