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

Add initial version of miss_hit #741

Merged
merged 9 commits into from
Dec 23, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix deployment
  • Loading branch information
jorgepz committed Dec 22, 2024
commit 34f2669a907c6eb3bdbc39d7c52d7ca94903d429
2 changes: 1 addition & 1 deletion docs/src/m2md.m
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ function m2md(fileIn, fileOut, includeCodeBoolean, iniLine)
currentLine = fgetl(fidIn);
end

if length(currentLine) >= 7 && strcmp(currentLine((end - 6):end), '% hidden')
if length(currentLine) >= 8 && strcmp(currentLine((end - 7):end), '% hidden')
% hidden line do not do anything

elseif length(currentLine) >= 4 && strcmp(currentLine(1:4), '% md') % not code
Expand Down
16 changes: 8 additions & 8 deletions examples/VIVCantilever/VIVCantilever.m
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
%md# WOM VIV
% md# WOM VIV
%
% add ONSAS path
close all, if ~strcmp( getenv('TESTS_RUN'), 'yes'), clear all, end
Expand Down Expand Up @@ -70,24 +70,24 @@
%
% boundaryConds
%
%md The first and unique BC corresponds to a welded condition for a cantilever beam
% md The first and unique BC corresponds to a welded condition for a cantilever beam
boundaryConds(1).imposDispDofs = [ 1 2 3 4 5 6 ] ;
boundaryConds(1).imposDispVals = [ 0 0 0 0 0 0 ] ;
%
% initialConds
%
%md homogeneous initial conditions are considered, then an empty struct is set:
% md homogeneous initial conditions are considered, then an empty struct is set:
initialConds = struct() ;
%
% mesh
%
%mdThe coordinates of the mesh nodes are given by the matrix:
% mdThe coordinates of the mesh nodes are given by the matrix:
mesh.nodesCoords = [ zeros(numElements+1,1) (0:(numElements))'*l/numElements zeros(numElements+1,1) ] ;
%mdThe connectivity is introduced using the _conecCell_. Each entry of the cell contains a vector with the four indexes of the MEB parameters, followed by the indexes of nodes that compose the element (node connectivity). For didactical purposes each element entry is commented. First the cell is initialized:
% mdThe connectivity is introduced using the _conecCell_. Each entry of the cell contains a vector with the four indexes of the MEB parameters, followed by the indexes of nodes that compose the element (node connectivity). For didactical purposes each element entry is commented. First the cell is initialized:
mesh.conecCell = { } ;
%md then the first welded node is defined with material (M) zero since nodes don't have material, the first element (E) type (the first entry of the `elements` struct), and (B) is the first entry of the the `boundaryConds` struct. For (I) no non-homogeneous initial condition is considered (then zero is used) and finally the node is assigned:
% md then the first welded node is defined with material (M) zero since nodes don't have material, the first element (E) type (the first entry of the `elements` struct), and (B) is the first entry of the the `boundaryConds` struct. For (I) no non-homogeneous initial condition is considered (then zero is used) and finally the node is assigned:
mesh.conecCell{ 1, 1 } = [ 0 1 1 1 ] ;
%md Next the frame elements MEB parameters are set. The frame material is the first material of `materials` struct, then $1$ is assigned. The second entry of the `elements` struct correspond to the frame element employed, so $2$ is set. Finally no BC and no IC is required for this element, then $0$ is used. Consecutive nodes build the element so then the `mesh.conecCell` is:
% md Next the frame elements MEB parameters are set. The frame material is the first material of `materials` struct, then $1$ is assigned. The second entry of the `elements` struct correspond to the frame element employed, so $2$ is set. Finally no BC and no IC is required for this element, then $0$ is used. Consecutive nodes build the element so then the `mesh.conecCell` is:
for i=1:numElements,
mesh.conecCell{ i+1,1 } = [ 1 2 0 i i+1 ] ;
end
Expand Down Expand Up @@ -117,7 +117,7 @@
%
[ modelCurrSol, modelProperties, BCsData ] = ONSAS_init( materials, elements, boundaryConds, initialConds, mesh, analysisSettings, otherParams ) ;
%
%mdAfter that the structs are used to perform the numerical time analysis
% mdAfter that the structs are used to perform the numerical time analysis
matUs = ONSAS_solve( modelCurrSol, modelProperties, BCsData ) ;

% Extract numerical solution
Expand Down
22 changes: 11 additions & 11 deletions examples/addedMassPendulum/addedMassPendulum.m
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
materials.modelParams = [ E nu ] ;
materials.density = rho_structure ;

%md### elements
% md### elements
elements(1).elemType = 'node' ;

elements(2).elemType = 'frame';
Expand All @@ -37,15 +37,15 @@
elements(2).aeroCoefFunctions = { anonymus_null, anonymus_null, anonymus_null };
elements(2).massMatType = 'consistent';

%md### boundaryConds
% md### boundaryConds
boundaryConds(1).imposDispDofs = [ 1 2 3 5 6 ] ;
boundaryConds(1).imposDispVals = [ 0 0 0 0 0 ] ;

%md### initial Conditions
% md### initial Conditions
initialConds = {} ;

%md### mesh parameters
%mdThe coordinates considering a mesh of two nodes is:
% md### mesh parameters
% mdThe coordinates considering a mesh of two nodes is:
x_ini = sind(angle_init)*l0 ;
mesh.nodesCoords = [ 0 0 l0 ; ...
x_ini 0 l0*(1-cosd(angle_init)) ] ;
Expand All @@ -54,7 +54,7 @@
mesh.conecCell{ 1, 1 } = [ 0 1 1 1 ] ;
mesh.conecCell{ 2, 1 } = [ 1 2 0 1 2 ] ;

%md### analysisSettings
% md### analysisSettings
analysisSettings.deltaT = T_analy/100 ;
analysisSettings.finalTime = T_analy*.5 ;
analysisSettings.methodName = 'newmark';
Expand All @@ -70,14 +70,14 @@
otherParams = struct();
otherParams.problemName = 'addedMassPedulum';
otherParams.plots_format = 'vtk' ;
%md
%mdFirst the input structs are converted to structs with the model information
% md
% mdFirst the input structs are converted to structs with the model information
[ modelCurrSol, modelProperties, BCsData ] = ONSAS_init( materials, elements, boundaryConds, initialConds, mesh, analysisSettings, otherParams ) ;
%
%mdAfter that the structs are used to perform the numerical time analysis
% mdAfter that the structs are used to perform the numerical time analysis
[ matUs, loadFactorsMat, modelSolutions ] = ONSAS_solve( modelCurrSol, modelProperties, BCsData ) ;
%md
%md the report is generated
% md
% md the report is generated
outputReport( modelProperties.outputDir, modelProperties.problemName )

times = (0:size(matUs,2)-1) * analysisSettings.deltaT ;
Expand Down
Loading
Loading