Skip to content

Instantly share code, notes, and snippets.

@Foadsf
Foadsf / blockMeshDict
Last active August 23, 2018 10:30
axisymmetric step OpenFOAM
//following this: https://openfoamwiki.net/index.php/Main_ContribExamples/AxiSymmetric
// /cygdrive/c/Users/sojoodif/surfdrive/sync/MyPhD/simulation/OpenFOAM/20180131_2
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 5 |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
@Foadsf
Foadsf / paraview_GUI_result.png
Last active September 20, 2021 11:09
paraview script to solve this problem http://bit.ly/2NnDKAW
paraview_GUI_result.png
/* File CMAIN.C */
#include <stdio.h>
extern int __stdcall FACT (int n);
extern void __stdcall PYTHAGORAS (float a, float b, float *c);
main()
{
float c;
@Foadsf
Foadsf / cell1.css
Last active December 20, 2018 22:19
%%html
<style>
body {
position: relative;
min-height: 90vh;
}
.content-wrap {
padding-bottom: 2.5rem;
}
@Foadsf
Foadsf / FmS.sci
Last active February 22, 2019 13:35
An energy/model based controller to minimize overshoot and respoonse time of a mass spring system
function F=FmS(x, xy, v)
K = Fmax * abs(xy - x) + k * (xy^2 - x^2) / 2;
if abs(xy - x) < 1e-6 then
F = k * x;
else
if K > 0 then
vm = sqrt(2 * K / m);
F = Fmax * sign(vm - v);
else
F = Fmax * sign(x - xy);
@Foadsf
Foadsf / .gitignore
Last active February 12, 2022 00:00
Scilab Serial Communication Toolbox (SSCT) --> this Gist is deprecated. please use https://github.com/Foadsf/ssct
docinfo.html
Documentation.md
pics/
@Foadsf
Foadsf / test.md
Last active March 13, 2019 19:19
test collapsible markdown

/*

This is the markdown text

used for documentation

Click to see the source code
@Foadsf
Foadsf / test.md
Last active July 8, 2024 09:18
to test markdown inside the HTML tags
#Lorem **ipsum** dolor sit amet, consectetur adipiscing elit, sed
@Foadsf
Foadsf / a.md
Created March 13, 2019 23:16
testing the markdon include olution from here https://stackoverflow.com/a/55152538/4999991
<iframe src="b.md" seamless></iframe>
@Foadsf
Foadsf / a.md
Created March 14, 2019 01:20
test iframe for include markdown files
<iframe src="b.md" seamless></iframe>