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

Is it feasible to implement viscous-spring boundary in SPEC-FEM2D by setting up a parallel spring-damper system? #1236

Open
ikunhub1 opened this issue Aug 5, 2024 · 1 comment

Comments

@ikunhub1
Copy link

ikunhub1 commented Aug 5, 2024

No description provided.

@ikunhub1
Copy link
Author

ikunhub1 commented Aug 5, 2024

Because I saw the bug code in the unresolved-bugs file
#------------------------------------------------------------------------------
def ProcessParfile_r19804(fic):
# Open the file and get all lines from Par_file
ligs= LoadLig(fic)

for ilg, lig in enumerate(ligs):
    if lig.startswith('PERFORM_CUTHILL_MCKEE'):
        ligs[ilg]=ligs[ilg].replace('.true.','.false.')

# Test if already processed
for lig in ligs:
    if 'ADD_SPRING_TO_STACEY' in lig:
        print('----> '+fic+' already processed to r19804')
        return
#
a1='ADD_SPRING_TO_STACEY            = .true.\n'

#--------------------------------------------------------------------------
# Add new parameters
#
for ilg, lig in enumerate(ligs):
    if lig.startswith('absorbing_conditions'):
        ligs.insert(ilg+1,a1)
#
move(fic,fic+'.before_update_to_r19804')
#
fm = open(fic,'w')
fm.writelines(ligs)
fm.close()
#
print('xxxxx------> '+fic+' processed to r19804')
return

#------------------------------------------------------------------------------

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