Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
ranzhengcode committed Sep 5, 2023
1 parent 4ad6c43 commit 7b46687
Show file tree
Hide file tree
Showing 19 changed files with 904 additions and 527 deletions.
2 changes: 1 addition & 1 deletion doc/InputTemplateA.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ pressure 0.00
# density of crystal cell (g/cm^3), default: 1.0 (g/cm^3)
density 1.0

# volume of crystal cell (A^3), default: 1.0 (Å^3)
# volume of crystal cell (A^3), default: 1.0 (A^3)
volume 1.0

# total number of atoms in crystal cell
Expand Down
2 changes: 1 addition & 1 deletion doc/InputTemplateB.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ pressure 0.00
# density of crystal cell (g/cm^3), default: 1.0 (g/cm^3)
density 1.0

# volume of crystal cell (A^3), default: 1.0 (Å^3)
# volume of crystal cell (A^3), default: 1.0 (A^3)
volume 1.0

# total number of atoms in crystal cell
Expand Down
2 changes: 1 addition & 1 deletion doc/InputTemplateC.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ pressure 0.00
# density of crystal cell (g/cm^3), default: 1.0 (g/cm^3)
density 1.0

# volume of crystal cell (A^3), default: 1.0 (Å^3)
# volume of crystal cell (A^3), default: 1.0 (A^3)
volume 1.0

# total number of atoms in crystal cell
Expand Down
2 changes: 1 addition & 1 deletion doc/InputTemplateD.txt
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ pressure 0.00
# density of crystal cell (g/cm^3), default: 1.0 (g/cm^3)
density 1.0

# volume of crystal cell (A^3), default: 1.0 (Å^3)
# volume of crystal cell (A^3), default: 1.0 (A^3)
volume 1.0

# total number of atoms in crystal cell
Expand Down
Binary file modified doc/VELAS Manual.pdf
Binary file not shown.
1 change: 0 additions & 1 deletion doc/VELAS logo info.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@


+-----------------------------------------------------------------------------+'
| |'
| V V EEEEEEE L A SSSSSSS |'
Expand Down
Binary file modified doc/VELAS_GUI.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added doc/~$LAS Manual.docx
Binary file not shown.
57 changes: 45 additions & 12 deletions inst/GUI/getUiInput.m
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,30 @@
pressure = str2num(prs);
end

% Density
den = get(VELAS.baseden,'String');
if isempty(den)
pressure = 1.0; % default:1.0 g/cm^3
else
density = str2num(den);
end

% Volume
vol = get(VELAS.basevol,'String');
if isempty(vol)
volume = 1.0; % default:1.0 A^3
else
volume = str2num(vol);
end

% For structure under pressure
atomn = get(VELAS.baseatomn,'String');
if isempty(atomn)
atomnum = 0; % default:0 GPa
else
atomnum = str2num(atomn);
end

% mesh number of theta(θ) (default:200), phi(φ) (default:400), chi (χ) (default:400)

mesh3d = get(VELAS.basenmesh3d,'String');
Expand Down Expand Up @@ -158,11 +182,11 @@
%% Properties
%{
properties — Pro(2*8)
Young Compressibility Shear Poisson Bulk Pugh Ratio Hardness Fracture Toughness
3D mode: 1/0 1/0 1/0 1/0 1/0 1/0 1/0 1/0
2D mode: 1/0 1/0 1/0 1/0 1/0 1/0 1/0 1/0
Young3D — Pro(1,1), Young2D — Pro(2,1);
Compressibility3D — Pro(1,2), Compressibility2D — Pro(2,2);
Shear3D — Pro(1,3), Shear2D — Pro(2,3);
Expand Down Expand Up @@ -196,16 +220,16 @@
else
proHv = 0;
end


KICtype = get(VELAS.proKICtppop,'Value'); % Fracture Toughness (KIC, MPa*m^(1/2))
KICmode = get(VELAS.proKICmdpop,'Value');
KIC = [];
KIC = [];
switch(KICtype)
case 2
KIC.material = 'IC';
case 3
KIC.material = 'PM';
KIC.material = 'M';
case 4
KIC.material = 'IM';
end
Expand Down Expand Up @@ -238,10 +262,17 @@
end

% % For fracture toughness Parameters
V0 = get(VELAS.proKICV0,'String');

if ~isempty(V0)
KIC.V0 = str2num(V0);
V0 = get(VELAS.proKICV0,'String'); % In fact, V0 = volume/atomnum.
if density ~= 1 && volume ~= 1
KIC.V0 = volume/atomnum;
set(VELAS.proKICV0,'String',num2str(KIC.V0,5));
else
if ~isempty(V0)
KIC.V0 = str2num(V0);
else
KIC.V0 = 1.0;
set(VELAS.proKICV0,'String',num2str(KIC.V0,5));
end
end

gEFr = get(VELAS.proKICgEFr,'String');
Expand Down Expand Up @@ -314,15 +345,17 @@
% Output filename
filename = get(VELAS.Cfname,'String');
if isempty(filename)

filename = strcat(pwd,filesep,'VELAS',strrep(datestr(now,'yyyymmddHH:MM:SS'),':',''),'.txt');
filename = strcat(pwd,filesep,'VELAS',datestr(now,'ddHHMMSS'),'.txt');
set(VELAS.Cfname,'String',filename);
end
Re.filename = filename;
Re.C = C;
Re.S = S;
Re.cryType = cryType;
Re.pressure = pressure;
Re.density = density;
Re.volume = volume;
Re.atomnum = atomnum;
Re.ntheta = ntheta;
Re.nphi = nphi;
Re.nchi = nchi;
Expand All @@ -338,4 +371,4 @@
else
msgbox({'A suitable crystal system should be selected first, or a 6 * 6 elastic constant symmetric matrix should be provided.','Please supplement and try again.'}, 'VELAS reminder','error');
end
end
end
Loading

0 comments on commit 7b46687

Please sign in to comment.