
From:  Konstantinos Poulios 
Subject:  Re: read a list of point in a python script to define a set of points with Dirichlet boundary conditions (follow up) 
Date:  Thu, 18 Nov 2021 23:03:25 +0100 
mfpb = gf.MeshFem(meshb, 1)
mfpb.set_classical_fem(press_fem_order)
Dear all
If I want to define a set of points with Dirichlet boundary conditions on a scalar unknown (pressure), are the following python script lines correct (using numpy here)?
import numpy as np
DPB = 2 # dirichlet on pressure brain
print('Read DIRICHLET boundary condition cranio');
# read dirichlet conditions on pressure
filecranio = open('craniopdir.txt', 'r') # 'r' = read
pidcranio = np.loadtxt(filecranio,dtype=int)
#print(pidcranio)
filecranio.close()
fcranio=meshb.faces_from_pid(pidcranio)
meshb.set_region(DPB,fcranio)
mfpb_ = gf.MeshFem(meshb, 1)
mfpb_.set_classical_fem(press_fem_order)
keptdofs = np.arange(mfpb_.nbdof())
keptdofs = np.setdiff1d(keptdofs, mfpb_.basic_dof_on_region(DPB))
mfpb = gf.MeshFem("partial", mfpb_, keptdofs)
How to set up that on these faces/nodes the pressure is non zero (p0= atmospheric pressure)?
Thank you
Regards
AnneCecile
The information contained in this email message may be privileged, confidential, and/or protected from disclosure. This email message may contain protected health information (PHI); dissemination of PHI should comply with applicable federal and state laws. If you are not the intended recipient, or an authorized representative of the intended recipient, any further review, disclosure, use, dissemination, distribution, or copying of this message or any attachment (or the information contained therein) is strictly prohibited. If you think that you have received this email message in error, please notify the sender by return email and delete all references to it and its contents from your systems.
[Prev in Thread]  Current Thread  [Next in Thread] 