Skip to content

Commit

Permalink
Add G&R post-processing
Browse files Browse the repository at this point in the history
  • Loading branch information
mrp089 committed Jan 30, 2024
1 parent 70216b9 commit 5aeeaa7
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 4 deletions.
4 changes: 3 additions & 1 deletion Code/Source/svFSI/consts.h
Original file line number Diff line number Diff line change
Expand Up @@ -359,6 +359,7 @@ enum class OutputType
outGrp_fS = 523,
outGrp_C = 524,
outGrp_I1 = 525,
outGrp_gr = 526,

out_velocity = 599,
out_pressure = 598,
Expand Down Expand Up @@ -387,7 +388,8 @@ enum class OutputType
out_viscosity = 575,
out_fibStrn = 574,
out_CGstrain = 573,
out_CGInv1 = 572
out_CGInv1 = 572,
out_gr = 571
};

/// @brief Possible physical properties. Current maxNPror is 20.
Expand Down
3 changes: 3 additions & 0 deletions Code/Source/svFSI/post.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1924,6 +1924,7 @@ void tpost(Simulation* simulation, const mshType& lM, const int m, Array<double>
case OutputType::outGrp_stress:
case OutputType::outGrp_cauchy:
case OutputType::outGrp_mises:
case OutputType::outGrp_gr:
Array<double> sigma(nsd,nsd);
Array<double> S(nsd,nsd);

Expand Down Expand Up @@ -2022,6 +2023,8 @@ void tpost(Simulation* simulation, const mshType& lM, const int m, Array<double>
double vmises = sqrt(mat_ddot(sigma, sigma, nsd));
resl(0) = vmises;
sE(e) = sE(e) + w*vmises;
} else if (outGrp == OutputType::outGrp_gr) {
resl = gr_int_g;
}
break;

Expand Down
5 changes: 3 additions & 2 deletions Code/Source/svFSI/set_equation_props.h
Original file line number Diff line number Diff line change
Expand Up @@ -582,12 +582,13 @@ SetEquationPropertiesMapType set_equation_props = {
outPuts = {OutputType::out_displacement, OutputType::out_stress, OutputType::out_cauchy, OutputType::out_strain};
//simulation->com_mod.pstEq = true;
} else {
nDOP = {12,2,0,0};
nDOP = {13,2,0,0};
outPuts = {
OutputType::out_displacement, OutputType::out_mises, OutputType::out_stress,
OutputType::out_cauchy, OutputType::out_strain, OutputType::out_jacobian,
OutputType::out_defGrad, OutputType::out_integ, OutputType::out_fibDir,
OutputType::out_fibAlign, OutputType::out_velocity, OutputType::out_acceleration
OutputType::out_fibAlign, OutputType::out_velocity, OutputType::out_acceleration,
OutputType::out_gr
};
}

Expand Down
3 changes: 2 additions & 1 deletion Code/Source/svFSI/set_output_props.h
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ std::map<consts::OutputType, OutputProps> output_props_map =
{OutputType::out_voltage, std::make_tuple(OutputType::outGrp_Y, 0, 1, "Action_potential") },
{OutputType::out_vortex, std::make_tuple(OutputType::outGrp_vortex, 0, 1, "Vortex") },
{OutputType::out_vorticity, std::make_tuple(OutputType::outGrp_vort, 0, maxNSD, "Vorticity") },
{OutputType::out_WSS, std::make_tuple(OutputType::outGrp_WSS, 0, maxNSD, "WSS") }
{OutputType::out_WSS, std::make_tuple(OutputType::outGrp_WSS, 0, maxNSD, "WSS") },
{OutputType::out_gr, std::make_tuple(OutputType::outGrp_gr, 0, 50, "GR") }
};

1 change: 1 addition & 0 deletions Code/Source/svFSI/vtk_xml.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1120,6 +1120,7 @@ void write_vtus(Simulation* simulation, const Array<double>& lA, const Array<dou
case OutputType::outGrp_stress:
case OutputType::outGrp_cauchy:
case OutputType::outGrp_mises:
case OutputType::outGrp_gr:
#ifdef debug_write_vtus
dmsg << "case " << " outGrp_stress";
#endif
Expand Down
1 change: 1 addition & 0 deletions tests/cases/struct/gr_equilibrated/svFSI.xml
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@
<Cauchy_stress> true </Cauchy_stress>
<Def_grad> true </Def_grad>
<VonMises_stress> true </VonMises_stress>
<GR> true </GR>
</Output>

<LS type="GMRES" >
Expand Down

0 comments on commit 5aeeaa7

Please sign in to comment.