-
Notifications
You must be signed in to change notification settings - Fork 19
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
Added ability for solver to account for leakage in the vessel, as well as relevant test cases for validation. #109
Open
JRao-rgb
wants to merge
13
commits into
SimVascular:master
Choose a base branch
from
JRao-rgb:addOutflowDraft5
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 9 commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
f21006d
added ability for outflow terms to be specified in the input file
JRao-rgb 05be02d
fixed linear solution. Now to go back add fix file I/O again...
JRao-rgb 8dce291
added new testing files to test the linear material as well as with o…
JRao-rgb 4fbf0cb
pytest changes. Not sure what they are. I didn't touch anything I jus…
JRao-rgb 436cb9e
fixed small error in test_integration.py that repeated one of the tests
JRao-rgb 5d99fb3
ok added build_skyline to gitignore so hopefully that will not be upl…
JRao-rgb ca60b52
cleaning up the build directories so hopefully they will not be commi…
JRao-rgb 2b37da0
removed (cleaned up) all my debug statements, so hopefully it shouldn…
JRao-rgb d78d0de
added documentation for the new test cases related to outflow
JRao-rgb 908ae08
there's been another issue: for some reason, the code is taking a lon…
JRao-rgb 08e1e09
got rid of the return statement issue. Only committing rn so I can ch…
JRao-rgb d8ae672
NOW I fixed the return issue. Ugh. I feel old.
JRao-rgb 4fd02c4
tried some things. Did not work. Going to try to make a separate bran…
JRao-rgb File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -63,35 +63,37 @@ cvOneDMaterialOlufsen::cvOneDMaterialOlufsen(){ | |
// printf("call cvOneMaterialsOlufsen p1_=%f K3_=%f \n",p1_,K3_); | ||
} | ||
|
||
cvOneDMaterialOlufsen::~cvOneDMaterialOlufsen(){ | ||
} | ||
cvOneDMaterialOlufsen::~cvOneDMaterialOlufsen(){} | ||
|
||
cvOneDMaterialOlufsen::cvOneDMaterialOlufsen (const cvOneDMaterialOlufsen &rhs){ | ||
// this seems not used | ||
cvOneDMaterial::operator=(rhs); | ||
double k1 = 0,k2 = 0,k3 = 0; | ||
double pref=0; | ||
rhs.GetParams( &k1, &k2, &k3, &pref); | ||
double pref=0; double P_amb_ref=0; double L_P_ref = 0; | ||
rhs.GetParams( &k1, &k2, &k3, &pref, &P_amb_ref, &L_P_ref); | ||
K1_ = k1; | ||
K2_ = k2; | ||
K3_ = k3; | ||
p1_= pref; | ||
P_ambient = P_amb_ref; | ||
L_P = L_P_ref; | ||
// printf("call cvOneDmaterialOlufsen &rhs\n"); | ||
|
||
} | ||
|
||
|
||
cvOneDMaterialOlufsen& cvOneDMaterialOlufsen::operator= (const cvOneDMaterialOlufsen &that){ | ||
if (this != &that) { | ||
cvOneDMaterial::operator=(that); | ||
double k1 = 0,k2 = 0,k3 = 0; | ||
|
||
double pref=0; | ||
that.GetParams( &k1, &k2, &k3, &pref); | ||
double pref=0; double P_amb_ref=0; double L_P_ref = 0; | ||
that.GetParams( &k1, &k2, &k3, &pref, &P_amb_ref, &L_P_ref); | ||
K1_ = k1; | ||
K2_ = k2; | ||
K3_ = k3; | ||
p1_= pref; | ||
P_ambient = P_amb_ref; | ||
L_P = L_P_ref; | ||
// printf("call cvOneDMaterialOlufsen that this K3_=%f p1_=%f \n",K3_,p1_ ); | ||
} | ||
return *this; | ||
|
@@ -102,8 +104,8 @@ void cvOneDMaterialOlufsen::SetMaterialType(double *mType,double Pref){ | |
K2_ = mType[1]; | ||
K3_ = mType[2]; | ||
PP1_=Pref; | ||
cout<< "Setting material K's "<< K1_ <<" "<< K2_<<" "<< K3_<< " ..." << endl; | ||
cout<< "Setting reference Pressure "<< PP1_<<endl; | ||
// cout<< "Setting material K's "<< K1_ <<" "<< K2_<<" "<< K3_<< " ..." << endl; | ||
// cout<< "Setting reference Pressure "<< PP1_<<endl; | ||
// printf("call SetMaterialType K3_ %f \n",K3_); | ||
} | ||
|
||
|
@@ -112,7 +114,6 @@ void cvOneDMaterialOlufsen::SetPeriod(double per){ | |
} | ||
|
||
double cvOneDMaterialOlufsen::GetProperty(char* what)const{ | ||
|
||
// Nothing to change here... | ||
if( strcmp( what, "density") == 0) | ||
return density; | ||
|
@@ -132,6 +133,18 @@ double cvOneDMaterialOlufsen::GetProperty(char* what)const{ | |
} | ||
} | ||
|
||
void cvOneDMaterialOlufsen::SetHydraulicConductivity(double value) { | ||
L_P = value; | ||
} | ||
|
||
void cvOneDMaterialOlufsen::SetStarlingAmbientPressure(double value) { | ||
P_ambient = value; | ||
} | ||
|
||
double cvOneDMaterialOlufsen::GetStarlingAmbientPressure() { | ||
return P_ambient; | ||
} | ||
|
||
double cvOneDMaterialOlufsen::GetEHR(double z)const{ | ||
double ro = Getr1(z); | ||
double ans =4./3.*( K1_*exp(K2_*ro) + K3_);//dyne/cm^2=g/cm/s^2 | ||
|
@@ -184,7 +197,6 @@ double cvOneDMaterialOlufsen::GetArea(double pressure, double z)const{ | |
// This property comes from the subdomain | ||
// | ||
// o Po is the the zero transmural pressure | ||
|
||
double pres = pressure; | ||
double So_ = GetS1(z); | ||
double EHR = GetEHR(z); | ||
|
@@ -207,7 +219,6 @@ double cvOneDMaterialOlufsen::GetDpDS(double S, double z)const{ | |
double So_ = GetS1(z); | ||
double ro=Getr1(z); | ||
double dpds=0.5* EHR * sqrt(So_/S)/S ; | ||
|
||
return dpds; | ||
} | ||
|
||
|
@@ -218,7 +229,7 @@ double cvOneDMaterialOlufsen::GetD2pDS2(double area, double z)const{ | |
} | ||
|
||
double cvOneDMaterialOlufsen::GetOutflowFunction(double pressure, double z)const{ | ||
return 0.0; // This is not used in our model | ||
return L_P*(pressure - P_ambient); // JR 10/11/23: added function for outflow term | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. No need for date/initials |
||
} | ||
|
||
double cvOneDMaterialOlufsen::GetDOutflowDp(double pressure, double z)const{ | ||
|
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Check out from master branch